mardi 19 mai 2015

Make add class 'active' to menu item on specific condition

I want to create a condition that will add 'active' class to a specific menu item - if the post belongs to a specific taxonomy.

for example:

if the current post belongs to 'red' taxonomy - I want menu item with the ID 'menu-item-146' to be added an 'active' class.

where do I start? :)

Aucun commentaire:

Enregistrer un commentaire