Skip Navigation

[Resolved] Shortcode Value not being passed to my leaflet map pop-up

This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 3 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#2315829
Screen Shot 2022-03-13 at 9.16.30 PM.jpg
Screen Shot 2022-03-13 at 9.13.45 PM.png

Hello,

I am trying to pass a shortcode through to leaflet wp maps, two of my other shortcodes (The image one and the open image in fullscreen) are working correctly but the shortcode for the title is not.

For some reason, the title shortcode works for the image alt text but not alone in the leaflet marker pop-up.

The link for the map with the issue is: hidden link and if you click on the trail icon you will see one of the popups.

I have attached two images to better explain what is happening.

Any ideas as to why this isn't working?

Thanks,
Cam

#2316089

Hello,

Please test the shortcode [types field='poi-name output='raw''][/types] directly(without leaflet shortcode), make sure it outputs correct result.

More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/

#2316843
Screen Shot 2022-03-14 at 8.50.59 PM.png

Hello Luo,

Thanks for your message. It is outputting correctly as shown in the screenshot attached.
Is there possibly another way to format the shortcode that may get it to work correctly?

Thanks,
Cam

#2316859

As your screenshot shows, Toolset shortcode [types field='poi-name output='raw''][/types] can output the result correctly, the problem is in "leaflet wp maps" plugin side, you need to check the author of "leaflet wp maps" for it for better, check if their plugin supports to use other shortcode inside leaflet wp maps shortcode.

#2316879
Screen Shot 2022-03-14 at 10.50.25 PM.jpg

The documentation says nothing directly about shortcodes inside for the text. (hidden link). However I am able to make the shortcode work on one of my other map views for the parent post of the repeatable group. See attachement. Do you know why that shortcode would work but the other one would not?

The link to the one that is working is: hidden link

Regards,
Cam

#2316897

As I mentioned above, the problem is in "leaflet wp maps" plugin side:
https://toolset.com/forums/topic/shortcode-value-not-being-passed-to-my-leaflet-map-pop-up/#post-2316859

According to our support policy, we don't provide support for other plugins, you need to check it with the author of "leaflet wp maps"

And you can also consider Toolset Maps plugin, which supports Toolset shortcodes without conflicts:
https://toolset.com/course-chapter/display-directory-items-on-maps/

You can download it here:
https://toolset.com/account/downloads/