I'm working on a custom theme for a website, and this website has a custom posttype 'Recipes'.

I added custom menu support and made a menu item which points to www.websitename.com/recipes And everything works fine.

But now I have the following problem with the 'active' classes for the menu. When you're on the custom posttype archive page of single page. The 'default' blog page gets the active class (current_page_parent)

Does anyone know how to fix this?


Have you tried the Add Custom Post Types Achives to Nav Menus plugin? I just tested this locally and I get a current-menu-item class on both the archive page and also on the single post type.

  • Yeah I tried that plugin, but it doesn't fix the problem. I do indeed get current-menu-item on the archive page. But at the same time, the blog page gets current_page_parent – Crinsane Jan 19 '13 at 15:38
  • Fair point. I think I read your question too quickly. – helgatheviking Jan 19 '13 at 16:24
  • Well, could also be it's not to well formulated ;) But thanks nonetheless. – Crinsane Jan 19 '13 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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