Tell us what you are trying to do?
Hi, I'm trying to use different map markers per category on this page right here:
hidden link
One is a PARK, one is a RESTAURANT.
Is there any documentation that you are following?
I've been trying to follow this, but not having any success:
https://toolset.com/forums/topic/different-map-markers/
Is there a similar example that we can see?
Yes, basically the same as what the ticket above was looking at.
What is the link to your site?
hidden link
Thank you!!!
Hello,
Please provide a test site with the same problem, fill below private message box with test site credentials, also point out the problem page URL, I can setup a demo for you.
I have done below modifications in your website:
Edit the problem page:
hidden link
1) find and select map block, in block setting panel, remove the marker setting, you can use below shortcode block to display the map markers
2) Find and select view block, add a shortcode block in view's loop, with below codes:
[wpv-conditional if="( '[wpv-post-type]' eq 'restaurant')"]
[wpv-map-marker map_id='Dallas-Fort-Worth-Map' marker_id='marker-[wpv-post-id]' marker_icon='//adventureswithmydog.com/wp-content/plugins/toolset-maps/resources/images/markers/Home.png' marker_field='wpcf-location-address'][wpv-post-link][/wpv-map-marker]
[/wpv-conditional]
[wpv-conditional if="( '[wpv-post-type]' eq 'park')"]
[wpv-map-marker map_id='Dallas-Fort-Worth-Map' marker_id='marker-[wpv-post-id]' marker_field='wpcf-location-address' marker_icon='//adventureswithmydog.com/wp-content/plugins/toolset-maps/resources/images/markers/Shop-2.png'][wpv-post-link][/wpv-map-marker]
[/wpv-conditional]
Above codes with check current post's post type value, and display different marker icon, you can change the "marker_icon" attribute value to other icon image URLs
More help:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker
All set and now have the code sample to use going forward too! Thanks Luo!!!!