Hi there Kriesi,
I'm creating a website using your Broadscope theme. I would like to highlight the main menu item when I'm on a sub-menu. Is there CSS or Javascript that can let me do this? For example I would like the menu item /wine/ to be highlighted in the main navigation when I'm on the sub-page /wine/varieties-and-tasting-notes/.
Please help!!!
Thanks!
How to make the parent menu item active when on a subpage
5 posts from 2 voices-
Posted 2 years ago #
-
Hey,
try to add following code to custom.css (located in the folder css):
.current-menu-ancestor, .current-menu-parent{ background: #000; color: #fff; }Adjust the color values as you like. I'm not sure if it works with all menu items though (because of the impact the mega menu has on the menu link classes).
Posted 2 years ago # -
Thanks for the fast reply! Not working for me though. Is there any other method you know of?
Thanks again!Posted 2 years ago # -
All good! Your suggestion worked in this way:
.current-menu-parent a, .current-menu-ancestor a {
color: #7dca8d;
}Thank you!
Posted 2 years ago # -
Glad that I could help you :)
Posted 2 years ago #
Reply
You must log in to post.














