Hi,
I tried to follow this instructions and even after hours of trying , it didn´t work: https://toolset.com/forums/topic/different-map-markers-based-on-custom-taxonomy/
I tried to have different marker pins based on the taxonomy.
The website is: hidden link
My shortcode is
[wpv-conditional if="(has_term('neighbourhood-typ', 'qualifying-patches', null) eq '1')"]
[wpv-map-marker map_id="map-5" marker_icon="<u>hidden link;" marker_id='marker-[wpv-post-id]' marker_field="wpcf-anschrift" marker_title=" "]
[wpv-post-link]
[/wpv-map-marker]
[/wpv-conditional]
Where is my mistake?
Thankyou for your help!
André Springhut
Hello,
Did you add the function name "has_term" into Toolset setting page?
Dashboard-> Toolset-> Settings-> Front-end Content
In section "Functions inside conditional evaluations", add WordPress function: has_term
If you need more assistance for it, please provide a test site with the same problem, I need a live website to test and debug, thanks
Thanks for the details, I have done below modifications in your website:
1) Create a new content template "marker-ct" with below codes:
hidden link
[wpv-conditional if="(has_term('qualifying-patch', 'neighbourhood-typ', null) eq '1')"]
[wpv-map-marker map_id="map-5" marker_icon="<em><u>hidden link</u></em>" marker_id='marker-[wpv-post-id]' marker_field="wpcf-anschrift" marker_title=" "]
[wpv-post-link]
[/wpv-map-marker]
[/wpv-conditional]
You can customize above shortcodes by following our document:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker
2) Edit the problem page:
hidden link
a) Find and select the map block, remove the marker settings
b) Find and select the view's loop block, add a content template block, and select the content template "marker-ct", see my screenshot view-loop2.jpg
Test it in frontend, I can see different marker icons correctly, please test again, check if it is fixed, thanks
My issue is resolved now. Thank you!