Active Menu Issue
I tried to use Post Category into the Menu and while reading a post, its category does not gets selected (active class) into the menu.
Hi, it's not issue,
see current class that wordpress created: current-post-ancestor current-menu-parent current-post-parent
for ex.
.current-menu-parent {
background-color: rgba(255,255,255,0.3);
}
@thapame I did some testing with the WordPress default themes and that word exactly the same way the walker class does. Personally, I prefer not to highlight the menu item for posts as you are not actually on that page.
That said as @yazdi mentioned the walker does output the standard WordPress classnames. This is made 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.