Adding class='active' to parent and child current-menu-item
Hello! I've been trying to get it to work like the image, parent and child submenu selected with no success. So far when I click any li ul li you have no idea where you are at unless you click the dropdown. It'd be nice to have the parent highlighted too. Any help? Thanks.
There is an active class applied to the parent but it is not its not called active walker outputs the standard WordPress classnames. You should style current-post-parent. This is makes it extremely simple if you are using LESS to compile your CSS as you can actually reference a class name and its properties inside another class.
.current-post-parent > a {
.navbar-nav > .active > a;
}
.current-post-parent > a:hover {
.navbar-nav > .active > a:hover;
}
When you compile this it should automatically apply the bootstrap active styles to the .current-post-parent class.
I got it to work. Thanks.
Awesome! Glad everything worked out :)
Hi i have the same Problem but i don't use the less file. what can i doo?