Skip Navigation

[Resolved] Conditional display with taxonomies does not work on translations

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
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 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 0 replies, has 1 voice.

Last updated by maximilianD 5 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1349767

I have a conditional logic to show some text based on taxonomies that are set for a product.

I have tried with both of the following:
[wpv-conditional if="( has_term('bos', 'bereich',null) eq '1' )" ]<span class="einsatzbereich-badge bos">Some Text</span>[/wpv-conditional]

{!{wpv-conditional if="( CONTAINS(#(bereich),'bos') )"}!}<span class="einsatzbereich-badge bos">Some Text</span>[/wpv-conditional]

It works fine in the main language (german) but not on the translations, because the slug of the translations of the taxonomies is different. I would expect that wpml or toolset automatically check the condition in the main language as it does with all other conditions.

Is there a way to fix this without having to insert the translated slugs in the conditional logic?