Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a parent page on my main menu. When you click on that page, you are presented a sidebar with another menu listing of all of its child pages. When you click on one of the child pages, the parent page is no longer active in the top menu.

How do I make both the parent page active on top and the active child page active in my left menu?

Thanks

share|improve this question

2 Answers 2

The parent page li receives the css classes current_page_parent and current_page_ancestor, style them to be similar to, or add them to the rules for current_page_item or current-menu-item in your theme's style.css.

share|improve this answer

above mentioned solution will only work if the child pages are not made with their own template (at least in my case it was like this). The solution i came up with is i kept my child page links in Dashboard > Appearance > Menue in the Menu under their parent menu link and just deactivated / hide the drop down by css (display: none;). Since i have different Page Templates for my Child Pages as the Parent Page i had the same issue. But with the connection in the navi the menu name of the parent page stays active on all child pages. It sounds confusing, but its actually very easy. i hope i made my self clear.. :)

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.