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

This solution does almost what I want it to.

Only thing is, I have my menu set up as follows:

Menu item 1
Menu item 2
   Custom post type 1
   Custom post type 2
   Custom post type 3
Menu item 3

Using the solution I mention adds the tag "current_url" to the sub menu of the custom post type I'm in ("Custom post type 1"). But I want it to add a "current_menu_item" (or something) to "Menu item 2".

Any way to do this?

share|improve this question

1 Answer

WordPress handles this by adding the current_page_ancestor and/or current_page_parent class to the parent item. Try styling those classes similar to current_menu_item.

share|improve this answer
1  
there are no current tags of any kind to the "main menu item". Which is what I'm trying to find a solution for. I'm assuming it's because I'm using a custom post type. – Lisa Jul 24 '12 at 18:12
are the custom post type links, custom links? – Joshua Abenazer Sep 7 '12 at 10:11

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.