Skip to content
This repository has been archived by the owner on Feb 10, 2020. It is now read-only.

missing .active class on current menu item #11

Open
farzadfaal opened this issue Oct 12, 2019 · 1 comment
Open

missing .active class on current menu item #11

farzadfaal opened this issue Oct 12, 2019 · 1 comment

Comments

@farzadfaal
Copy link

farzadfaal commented Oct 12, 2019

Thanks for great work!
There is no '.active' class added to current menu item.
I figured it out by extending menu item class using SCSS:
.current-menu-item .nav-link {@extend .active}
but I think there should be native support for this.

@globdug
Copy link

globdug commented Nov 28, 2019

Hello,
I solved this problem adding this check in start_el function after the $classes[] = 'nav-item'; on line 119.
if( in_array('current-menu-item', $item->classes ) ) $classes[] = 'active';

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants