manu
manu

Reputation: 77

Keeping parent page active in menu, when on a child page

I've created the page "press" child of media page (parent). when i'm on press page, the parent page (media) in menu doesn't remain active.

Upvotes: 1

Views: 458

Answers (1)

Simon Pollard
Simon Pollard

Reputation: 2588

If you are using a standard WordPress menu the parent li container should get the following classes "current-page-ancestor current-menu-ancestor current-menu-parent current-page-parent" when you are on the child page - so just make use of those in your CSS

Upvotes: 1

Related Questions