I have a WordPress site where I am adding a custom style to the main navigation based on whether the user is on that page. The articles section of my site has several articles within it that users can visit.
I use this css style as seen below which has the desired effect when the viewer is on the articles page, WordPress helpfully adds the current-menu-item class to the html markup:
#navigation li a:hover, #navigation li.current-menu-item a {
text-shadow: 1px 1px 2px red;
-webkit-transition: color 0.5s, text-shadow 0.5s;
-moz-transition: color 0.5s;
-o-transition: color 0.5s;
}
However I would like to keep this style applied to that top level item if the user is in a single article page. Is there a way of achieving this?