Remove current-menu-item class from anchor menu items

Published: Leave a comment Last update:

If you’re using links with anchors in your menus, you may notice that they sometimes automatically get the class current-menu-item, which may not what you want to. This is especially true if you have a sub-menu with anchors pointing to an ID on a sub page. This would result in all the anchor links being highlighted as active with the current-menu-item class when the sub page is accessed.

Continue reading Remove current-menu-item class from anchor menu items