The menu main point is not highlighted when the visitor is on a submenu page. How can I change this?
The menu main point is not highlighted when the visitor is on a submenu page.
Hi 🙂
Add the following to your own Custom CSS plugin or Customize > Additional CSS
/* Menu */
.main-navigation ul li.current-menu-parent a {
color: red;
}Change the value red to your hexadecimal color value required.
Thanks, now it works but now every sub-menu page is also highlighted and not just the one the visitor is on. Can this be improved?
Sure, moment…
How about:
/* Menu */
.main-navigation ul li.current-menu-parent > a {
color: red;
}Thanks, this is much better, but now the submenu page is not highlighted. It would be perfect if the visited sub-menu page is also highlighted.
This shouldn’t have any effect on the sub-menu page, that should still be highlighted. Please, send a link to your site. Thanks.
You’re right. It was not displayed in Customizer only. When I left it, it worked.
Thanks for the quick help. 🙂
Thanks for checking. To help with one page layouts the current class is being added with JS so, unfortunately, it won’t show in the Customizer.
All the best 🙂