Soil Nav Walker issue

Hi Roots team

I’ve found an issue with the nav-walker in Soil. When I create a menu, with a sub menu, the parent menu-item gets an ‘active’ class added.

If I change line 43 to read like this:

if (($this->archive && $child->url) && ($child->current_item_parent || Utils\url_compare($this->archive, $child->url))) {

then it doesnt add the active class to the parent anymore, and does so correctly when I browse to that parent page, and correctly so to a sub page of that parent.

Make sense?

Not sure if this is because I have the menu structure like this (to build a mega nav):

Parent Item
– Parent Item
---- Sub Item
---- Sub Item

Hey Paul!

I believe it’s meant to be like this since all any classes with current in the name get turned into active. On a default WP install you’d see current-page-ancestor and current-page-parent (or similar) on your nav items