Tell us what you are trying to do?
I want to use two different templates based on the taxonomy selected.
CPT is Events (Tickera plugin)
Taxonomy slug could be: "campamento" o "evento"
I tried several options:
First one:
[wpv-conditional if="( '[wpv-post-taxonomy type="event_category" format="slug"]' eq 'campamento' )" debug="true"]
<p>Campamentot!</p> [/wpv-conditional]
[wpv-conditional if="( '[wpv-post-taxonomy type="event_category" format="slug" ]' eq 'evento' )" debug="true" ]
<p>Evento! </p>[/wpv-conditional]
Second one:
[wpv-if evaluate="has_term('campamento', 'event_category', null) = '1'" debug="true"]
<p>CAMPAMENTO</p>
[/wpv-if]
[wpv-if evaluate="has_term('evento', 'event_category', null) = '1'" debug="true"]
<p>EVENTO</p>
[/wpv-if]
Third one:
[wpv-if evaluate="has_term('campamento', 'taxonomy-slug', null) = '1'" debug="true"]
<p>CAMPAMENTO</p>
[/wpv-if]
[wpv-if evaluate="has_term('evento', 'taxonomy-slug', null) = '1'" debug="true"]
<p>EVENTO</p>
[/wpv-if]
Debug info:
####################
wpv-if attributes
####################
Array
(
[evaluate] => has_term('campamento', 'taxonomy-slug', null) = '1'
[debug] => true
)
####################
Debug information
####################
--------------------
Original expression: has_term('campamento', 'taxonomy-slug', null) = '1'
--------------------
After expanding custom functions and date expressions: has_term('campamento', 'taxonomy-slug', null) = '1'
After matching 3 numeric strings into real numbers: has_term('campamento', 'taxonomy-slug', null) = 1
Matched '1' to 1
--------------------
End evaluated expression: has_term('campamento', 'taxonomy-slug', null) = 1
--------------------
La expresión condicional contiene caracteres no permitidos
####################
wpv-if attributes
####################
Array
(
[evaluate] => has_term('evento', 'taxonomy-slug', null) = '1'
[debug] => true
)
####################
Debug information
####################
--------------------
Original expression: has_term('evento', 'taxonomy-slug', null) = '1'
--------------------
After expanding custom functions and date expressions: has_term('evento', 'taxonomy-slug', null) = '1'
After matching 3 numeric strings into real numbers: has_term('evento', 'taxonomy-slug', null) = 1
Matched '1' to 1
--------------------
End evaluated expression: has_term('evento', 'taxonomy-slug', null) = 1
--------------------
La expresión condicional contiene caracteres no permitidos
Is there any documentation that you are following?:
https://toolset.com/forums/topic/content-template-for-single-page-of-different-taxonomy/
https://toolset.com/documentation/user-guides/views-shortcodes/#vf-153493
Is there a similar example that we can see?
What is the link to your site?
hidden link
hidden link