Dynamic Menu Highlighting between Pages and Posts
-
I have created a website which keeps track fo which page the user is on and highlights the correct links accordingly. I have now come to the dynamic part of the site and when the links go to the posts section I can no longer keep track of where I am. How do I do this?
Using an example:
I have a members page, which when clicked on the link is highlighted to show it is current. I have this set up so that this ‘members’ parent remains highlighted for all child links. However, in the members section the content is mostly dynamic and so not suitable to use pages. As such I am using posts, and I can display the posts on the members page. The problem comes when clicking the link to read a specific post in detail. WP then loads the category page and all link tracking stops.
Is there a specific way I need to set the site up to enable the tracking to remain functional throughout? Or is there a clever plugin that will assist with this? r will I have to do some coding myself? I’d really appreciate some input and advice from those who have attempted similar setups.
Edit: I have looked at using the
in_category()
function but because my main menus are dynamically created I don’t see how I can implement this.
- The topic ‘Dynamic Menu Highlighting between Pages and Posts’ is closed to new replies.