Skip Navigation

[Resolved] Split: custom map markers based on taxonomy terms

This support ticket is created 4 years 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.

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/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 4 years ago.

Assisted by: Waqar.

Author
Posts
#1835133

I have three questions relating to this page: hidden link I'm using legacy Views to build this page.

2. I want custom map markers based on taxonomy terms. I'm reusing code that worked fine on another site I built a year or two ago, but on this one, the markers simply don't appear. I may be missing something obvious but I can't see what. It's this approach, a Content Template with:

[wpv-conditional if="(has_term('pancake-house', 'vendor-type', null) eq '1')"]hidden link;, etc.

Thanks very much. Will be happy to provide wp-admin info if that helps.

#1835173

While troubleshooting, I noticed that the "has_term" function from WordPress, wasn't registered at WP Admin -> Toolset -> Settings -> Front-end Content -> Functions inside conditional evaluations.
( screenshot: hidden link )

I've added it and the conditions in the "marker image" content template are working now.

There is however, a challenge with the logic used. As "Vendors" can have more than one term from the "vendor-type" taxonomy, the conditions used in the template can be true more than once. This means that it will return multiple marker images, which is not supported by the "wpv-map-marker" shortcode.

Do you plan to prioritize any specific term's icon, when multiple terms are attached or do you plan to use special icons which show combined images of the terms?

#1835651

Ah, I knew there must be something I was missing, I forgot about having to register that function.

I did know I would need to change the logic for displaying the markers and I seem to have that working correctly.

The JS for jumping up to the map is working.

I'll create two views to deal with the pagination issue and see how that goes.

Thanks very much for your help with this. I'll let you know if I run into any more issues.

#1838789

Thanks for the update and glad that my message helped.

You're welcome to share any follow-up questions here and for each new questinon or concern, please start a new ticket.