Aftre upgrading to 0.8.4 the navwalker stops working. The menu's are there, i can see them in the markup, only the carots disappear and the menu no longer "drops down".
Markup looks as follows:
0.8.2:
<a title="Onderwerpen" href="#" data-toggle="dropdown" class="nav-link dropdown-toggle">Onderwerpen <span class="caret"></span></a>
0.8.4
<a title="Onderwerpen" href="_link to page_" class="nav-link">Onderwerpen</a>
I tried changing my wp_nav_menu to fit the changed walker but this didn't work.
<?php wp_nav_menu(
array(
'theme_location' => 'primary',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'navbarNavDropdown2',
'menu_class' => 'navbar-nav top-menu',
'fallback_cb' => '',
'menu_id' => 'main-menu',
'walker' => new Understrap_WP_Bootstrap_Navwalker()
)
); ?>
I ran into the same / a similar issue for the same upgrade from 0.8.2 to 0.8.4.
In my case this was caused by a custom header.php file in my child theme that wasn't updated to use the new wp_nav_menu() Walker, i.e. Understrap_WP_Bootstrap_Navwalker, ref changeset
Yeah, i thought this would be my problem is well but it doens't seem like it. I already updated my menu in my custom header.php to fit the walker, i.e.:
<?php wp_nav_menu(
array(
'theme_location' => 'primary',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'navbarNavDropdown2',
'menu_class' => 'navbar-nav top-menu',
'fallback_cb' => '',
'menu_id' => 'main-menu',
'walker' => new Understrap_WP_Bootstrap_Navwalker()
)
); ?>
Both capital u and lowercase U do nothing here.
Forgot to mention that in the original question. Added it now. :)
Hi, I had the same problem, and after an hour of headbanging against the wall I think I've found the solution: you have to add the "depth" argument (i.e. "depth" => 2).
Hope this helps!
@marcomagnano You just saved me a lot of headbanging against the wall! That was exactly it. Thanks a lot!
Most helpful comment
Hi, I had the same problem, and after an hour of headbanging against the wall I think I've found the solution: you have to add the "depth" argument (i.e. "depth" => 2).
Hope this helps!