I’m fine tuning the active states when users are in a certain nested page. I manage well with pages and blog posts, but there’s a problem with the portfolio entries.
When I’m at a portfolio page, and look in the source, it always displays the blog as active parent.
current_page_parent class I’m talking about.
How can I make it the page which holds the portfolio?
By force if it has to.
This is not possible because WP doesn’t know the “parent/child” relationship between portfolio single entries and portfolio overview pages. I”ll tag this thread for Kriesi – maybe he has an idea how to apply the right menu item classes.
I’d recommend to use the “current-menu-parent” class instead of “current_page_parent” because then the “blog” page will not be marked as active if you’re on the portfolio page even if it’s a child page of the blog page.
I’m using page parent, because not all pages/posts have their own sub menu item. This way, when a user is in a deep nested sub page he still knows in which main menu item he is.
It’s consistent everywhere except for the custom taxonomy portfolio.
WP sees it as a blog post regarding page parent, instead of a portfolio post.
I understand it’s hard to make the parent page correct for a portfolio post, but at least it shouldn’t make the blog page as parent, because now, when I click a portfolio item, my blog menu-item gets highlighted as active :)
So if you could advice me where to comment out or edit where this happens?
Basically all my portfolio items can have the same page parent, if this makes it easier.