• Resolved Atanas Yonkov

    (@nravota12)


    I am trying to make a custom popup message that displays a custom post type shortcode with a specific id. The reason for this is that the popup should contain dynamic text and images. However, when I try to add any shortcode inside the [leaflet-marker] shortcode, unfortunately, it is not working:

    [leaflet-marker lat=37.77608364507807 lng= -122.4944572311289] [custom-post] [/leaflet-marker]

    Is there any way around this?

    • This topic was modified 2 years, 3 months ago by Atanas Yonkov.
Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter Atanas Yonkov

    (@nravota12)

    @bozdoz, That works but try adding content from custom post type by using a shortcode, like I try to do. It works but strips html from the_content(), so the only way to get it work with html markup is to remove these two lines and remove the unescape function https://i.imgur.com/hEcR2ul.png (hardcoding an image src won’t work for me, i need to display dynamic content there with image gallery)

    My point is, if you provide a hook to modify the above-mentioned function, my issue would be resolved. I do not see why it would be an issue to add a hook and making this plugin a bit more customizable.

    Sorry this topic got a bit off, since at the beginning I did not realise the actual problem and the solution I need. I understand it might have been quite confusing for you to understand the issue I am having, so do ask if anything is still not clear.

    Plugin Contributor hupe13

    (@hupe13)

    Plugin Contributor hupe13

    (@hupe13)

    @nravota12, can you test please, if this works for you? My test with a small WordPress gallery works. Thank you very much.

    Thread Starter Atanas Yonkov

    (@nravota12)

    @hupe13 , @bozdoz , thank you for the update. I tested it and the gallery is now working, however, the lightbox breaks, as well as some minor styling issues. I issued a PR with detailed information and reproduction steps: https://github.com/bozdoz/wp-plugin-leaflet-map/pull/208

    Plugin Author bozdoz

    (@bozdoz)

    do_shortcode has been added to all popups in v3.2.0

    Thread Starter Atanas Yonkov

    (@nravota12)

    @bozdoz , @hupe13 , is there any update regarding my comment in the PR?

    I can confirm the shortcode is now working and the gallery appears inside the leaflet popup, however, since code gets stripped, when a gallery image gets expanded, the lightbox breaks (you cannot slide to other images from the gallery). Perhaps there can be some workaround to that as well?

    Plugin Author bozdoz

    (@bozdoz)

    I can make it work; it’s just been super unclear, and I’m not enthused at all about doing it. Maybe give me a week or two.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘How to Add Shortcode inside Leaflet Marker Shortcode’ is closed to new replies.