Skip Navigation

[Resolved] How to highlight current taxonomy page

This support ticket is created 5 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by toolset-dave 5 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#1234685

Hello,

I have a WordPress Archive and on child taxonomy I would like to highlight the current taxonomy page. See hidden link, there are 3 links under the buton and the first one should be bold. For displaying links I use [wpv-taxonomy-link] in loop in View which is inserted in Archive.

#1234842

Hello,

There isn't such a built-in feature within Views, I suggest you try these:
1) create a custom PHP function to check if current page is specific term's archive page, then return value 1
https://codex.wordpress.org/Function_Reference/is_tax

2) Use shortcode [wpv-conditional] to check above custom PHP function's result, if the result equal to 1, then display a highlight link, else display a normal link.

See our document:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-custom-functions-in-conditions/

Please let me know if you need more assistance for it.

#1237563

Hi Luo,

I have found a working solution that you have made some time ago: https://toolset.com/forums/topic/setting-a-specific-style-for-the-active-taxonomy/