WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/)?

share|improve this question
up vote 2 down vote accepted

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

share|improve this answer

Your Answer


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

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