0
votes

On my Wordpress site I have the main primary menu set up with links to pages & top level categories. When I'm viewing a page the top menu highlights the proper menu item and all works just fine, but when I click on a post that falls under one of the category menu items it is not highlighted. I want the category menu item to highlight when I click on a post that uses that category. How would I accomplish that?

Website: http://deutschmetal.com If you click on this post: http://deutschmetal.com/deutsch-metal-videos/rammstein-herzeleid-videos/ you can see that the top menu link "Videos" is not highlighted. I would like it to be highlighted when viewing the post.

1
Add your active styles to .current-menu-parent {...}MattHamer5
Or .current-post-ancestorjrswgtr
Or .current-post-parentMattHamer5

1 Answers

0
votes

Wordpress detects it if a page is the child of a page in the navigation. It also adds a extra class to it, so you can create some new CSS to make it look the way you want. In your case this would be:

.current-post-parent.current-post-ancestor {
    background: #cb0808;
}

You can add this in your Wordpress theme, or if you are not familiar with coding you can use the customizer's custom CSS that is supported is most of the themes.