Support » Fixing WordPress » create main menu-highlight current page even when on child
9 years, 8 months ago
I am trying to use wp_list_pages (or not, I’m flexible) to create a main menu that will output only some of my top level pages, not their children. No problem there.
But, I want some class to be output (.current_page_item for example) on one of those parents when I am on a child of that parent.
For example, when I am on “photos > my favorites” I want my top level page “photos” menu item to be identified as the active page.
Is this possible?
Thanks much, you’re a peach!
The parent of the currently displayed page gets a second css class “current_page_parent”…
I did not know that! Excellent, and sorry for the bother.