Problem: I have an archive assigned to multiple taxonomies. I would like to display some information conditionally depending on where the archive is displayed, per taxonomy or per term.
Solution: Use the is_tax function built-in to WordPress to determine the current archive location. Be sure to register it in Toolset > Settings > Front-end content > Functions inside conditional evaluations, and be sure to supply all optional arguments to the function like so:
[wpv-conditional if="( is_tax('auteur', null) eq '1' )"] ... this is the auteur taxonomy archive... [/wpv-conditional]
Relevant Documentation:
https://codex.wordpress.org/Conditional_Tags#is_tax
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 6 replies, has 2 voices.
Last updated by 4 years, 7 months ago.
Assisted by: Christian Cox.