Passer la navigation

[Résolu] Unique markers for taxonomy terms

This support ticket is created Il y a 4 years, 4 months. 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par jureF Il y a 4 years, 4 months.

Assisté par: Minesh.

Auteur
Publications
#2341917
page-view.jpg
has_term.jpg

Hello.
I read a lot of topics on your support about markers. But i really can not get it to work.
What i need is a unique icon on the map for 4 different terms in taxonomy.

Admin access:
lien caché
User: toolset
Password: toolset

The page i am working on is here:
lien caché

Post-slug: clan
Taxonomy-slug: vrsta-organizacije
Terms: drzavna-institucija, nevladna-organizacija, podjetje, razvojno-raziskovalna-institucija
Address-slug: naslov

1. Added has_term in toolset settings
2. I created a map: map-13 ( Source of marker is View block ). Marker ID : marker-25
3. html block with conditional:
[wpv-conditional if="(has_term('podjetje', 'vrsta-organizacije', null) eq '1')"]
[wpv-map-marker map_id="map-13" marker_icon="lien caché" marker_id='marker-25-[wpv-post-id]' marker_field="wpcf-naslov"]
[wpv-post-link]
[/wpv-map-marker]
[/wpv-conditional]

[wpv-conditional if="(has_term('nevladna-organizacija', 'vrsta-organizacije', null) eq '1')"]
[wpv-map-marker map_id="map-13" marker_icon="lien caché" marker_id='marker-25-[wpv-post-id]' marker_field="wpcf-naslov"]
[wpv-post-link]
[/wpv-map-marker]
[/wpv-conditional]

I am doing something wrong for sure.
Is it please possible to help me out.

I am looking forward hearing from you soon,
Best regards ,
Jure Fras

#2341959

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Here is the doc that shows example about how you can display content conditionally based on the taxonomy term:
- https://toolset.com/documentation/legacy-features/views-plugin/displaying-taxonomies-conditionally/

Can you please try to adjust your conditional statement accordingly and check if that help you to resolve your issue.

#2342011

Hello,
I have changed condition:
from: [wpv-conditional if="(has_term('podjetje', 'vrsta-organizacije', null) eq '1')"]
to: [wpv-conditional if="( '[nevladna-organizacija]' eq 'podjetje' )"]

No changes...

Mybe iam not putting the code in right place. I have used html block below map block. Both are outside view block.

#2342019

Minesh
Supporter

Here is the example as per your requirement.

Can you please try to use the following conditional code and check if that helps you to resolve your issue:

[wpv-conditional if="( CONTAINS(#(vrsta-organizacije),'podjetje') )"]
[wpv-map-marker map_id="map-13" marker_icon="<em><u>lien caché</u></em>" marker_id='marker-25-[wpv-post-id]' marker_field="wpcf-naslov"]
[wpv-post-link]
[/wpv-map-marker]
[/wpv-conditional]

[wpv-conditional if="( CONTAINS(#(vrsta-organizacije),'nevladna-organizacija') )"]
[wpv-map-marker map_id="map-13" marker_icon="<em><u>lien caché</u></em>" marker_id='marker-25-[wpv-post-id]' marker_field="wpcf-naslov"]
[wpv-post-link]
[/wpv-map-marker]
[/wpv-conditional]

Please make sure that you add this conditional content within the view's loop, so please move the custom HTML block within the view's loop.

#2342027

Brilliant super fast support - thank you for patience diligence and prompt responses.

My issue is resolved now. Thank you!