Hi folks
I've got a list of taxonomy terms that I've created using a view. When this displays on the taxonomy archive page I would like the current taxonomy to be indicated.
For example, this is the page for the monumental category: hidden link
The Filter list across the top is inserted using a view, with the following loop:
<wpv-loop>
[wpv-taxonomy-link]
</wpv-loop>
Is there a way of adding a class which appears if you're on the archive for the current term? So, for my example I would like Monumental to have class="current".
Many thanks, Emily
It's not possible natively but several users have achieved this goal with a custom code.
More details can be found here:
https://toolset.com/forums/topic/setting-a-specific-style-for-the-active-taxonomy/
https://toolset.com/forums/topic/how-to-conditionally-change-appearance-of-taxomony-title-in-list/
I think these 2 tickets should help you to achieve the goal as well
It requires custom code which usually does not fall under our Support, but if you struggle with its implementation we can eventually help.
Hi Beda
Thanks for your suggestions. I had a go with the suggestions in those two forum posts but couldn't get either to work I'm afraid.
Actually, the solution in this case was to use the Category widget - as this was for the posts categories rather than a custom taxonomy that did the trick.
Thanks again for your help.
Cheers, Emily