Skip Navigation

[Résolu] Use custom shortcode attributes to display in view

This support ticket is created Il y a 6 années et 10 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Marqué : ,

This topic contains 2 réponses, has 2 voix.

Last updated by Justin Il y a 6 années et 10 mois.

Assisted by: Luo Yang.

Auteur
Publications
#540376

I am trying to:
Use custom shortcode attributes to display in view

I am trying to use a GLOBAL Map, but have custom shortcode attributes and use it something like this. I do NOT want to filter my map results, I just want to CENTER it on something using the LAT/LONG,

my shortcode could look something like this
[wpv-view name="map" lat="-113....." long="55......"]

And then inside the actual VIEW how would I place those custom view params into the content template.
[wpv-map-render map_id="map-1" general_center_lat="LAT" general_center_lon="LONG"]

Something like using the VIEW_PARAM() ???? but not sure.

Thanks in advance.

#540400

Dear Justin,

Yes, you can pass parameter with attribute of Views shortcode [wpv-view], see our document:
https://toolset.com/documentation/user-guides/passing-arguments-to-views/
section "Controlling the filter with shortcode attributes",

Then you will be able to get the attribute values with shortcode [wpv-attribute], see above document:
section "Accessing the arguments": If you used a View shortcode attribute to pass the value you can use another shortcode wpv-attribute.

#540656

Awesome thank you!
I didn't see that in the docs.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.