I am trying to:
Display some text depending on the taxonomy . So I have a content template for my custom post type recipe. Someone lands on a recipe which is under the Vegan taxonomy and I wanted to add a custom message for that particular page. Not sure how to do it with the currently settings.
Thank you for contacting Toolset Support. I am happy to help you with this.
For this you would use a wpv-if conditional and the WordPress native function has_term.
[wpv-conditional if="(expression)"]
What will be done if the expression is true
[/wpv-conditional]
wpv-if Information
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/#check-if-post-has-taxonomy-term
1. Go to Toolset > Settings > Frontend Content > Functions inside conditional evaluations and add has_term
2. Use has_term to evaluate if a post is inside that term:
https://codex.wordpress.org/Function_Reference/has_term
So the code would go like this:
[wpv-conditional if="(has_term( 'jazz'))"]
What will be done if the expression is true
[/wpv-conditional]
Please let me know if this resolves your question or if it needs more investigation.