Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to get wordpress to highlight a specific item in my menu when a post (any post) is viewed. I'm thinking that adding the post to the menu item, then suppressing display of sub-menus might help, but my 'Menus configuration' page doesn't show posts as items to add to the menu.

Does anyone know why that is, or if there's a better alternative to this method?

I'm using a copy of the default twentyten theme which calls wp_nav_menu in header.php.

share|improve this question

2 Answers

up vote 3 down vote accepted

You should be able to take the body class (single) and the nav item class (to be determined) and specify the style you'd like to show in the stylesheet. Something like this:

.single .topnav-item-29 {color: #fff; background: #333;}
share|improve this answer
That's a nice simple solution. It's not EXACTLY what I was after, but it's a decent workaround, so unless I get anything else, I'll mark this accepted. – Bobby Jack Sep 3 '10 at 9:18

As far as i know you should just hit the button on the upper right ("options" - normally you'll find "help" there) and then add posts to it. Yea i know the UI is pretty bad at the moment. Btw: talking about v 3.0.2.

share|improve this answer

Your Answer

 
discard

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.