vendredi 30 janvier 2015

Highlight specific menu item when custom post is page


I know that this question was asked many times, but I did not find a really good solution for my problem:


I have a custom post type "event" with some categories like "lecture". For each category, I created an individual page which shows category infos and a list of the events from this category. The pages are all accessible from submenu entrys.


If I open an event, no menu item is highlighted as current. I think the best solution would be to "link" each category to it's page, but I don'T know how to do this.


Adding the proper classes to the menu items and and their parents would be good, but modifying the nav menu walker would be perfect (another addon nneeds to know which one is the current menu entry to show the current submenu in a second navbar).





Aucun commentaire:

Enregistrer un commentaire