The navigation menu of my site is generated via

wp_nav_menu( array( 'theme_location' => 'primary') );

Some menu entries are category pages (say /category/news/). This page contains links to the next level, single post posts (say /news/123/).

I noticed that the menu is only highlighted ('current-menu-item' class) when the category page is the current. How can I make the menu stay highlighted when viewing single post pages (/news/123/)?

1 Answer 1


You can target the .current-menu-parent class in your CSS to keep the category highlighted when viewing single posts.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.