Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a nav like this:

  • page 1 -- page 1.1 -- category 1.2
    • page 2
    • page 3

When I am on a single post in the category 1.2, the category-menu-item gets the correct class current-post-ancestor and current-post-parent, but the page 1 has none of the parent or ancestor classes.

Is there a way to add a foobar" class down the nav hierarchy? I've fouad some filters for nav_menu_css_class but can't get the correct behavior.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.