Skip Navigation

[Résolu] How to highlight current taxonomy page

This support ticket is created Il y a 5 années et 7 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par toolset-dave Il y a 5 années et 7 mois.

Assisté par: Luo Yang.

Auteur
Publications
#1234685

Hello,

I have a WordPress Archive and on child taxonomy I would like to highlight the current taxonomy page. See lien caché, 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/