Problem:
How to display different map marker icons for some posts
Solution:
Assuming you have a post type displayed on a map and the posts have a custom field that is used to determine whether one marker icon should be used or another, then you can use the wpv-conditional shortcode to add the marker with different icon settings according to the custom field value.
See "Customizing the marker icons" in the documentation about using custom icons for markers.
In the View Loop Output section insert the wpv-map-marker shortcode twice, once for each icon required, which can be done with the Fields and Views button.
Now wrap each wpv-map-marker shortcode in a wpv-conditional test for the custom field, as described below: https://toolset.com/forums/topic/clickable-list-of-locations-below-map-revisited-2/#post-524218
Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
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 |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 3 respuestas, has 2 mensajes.
Last updated by Craig hace 6 años, 10 meses.
Assisted by: Nigel.