Dropdown menu is missing the dropdown-toggle class.
adampatterson opened this issue · comments
Steps to reproduce the issue:
A parent menu item that is a page with a few sub-pages.
What I expected:
I'd like to see the dropdown toggle.
The dark menu is hardcoded, while the light menu was generated with WP_Bootstrap_Navwalker
What happened instead:
The generated HTML functions as a dropdown menu but the parent menu item is missing dropdown-toggle
.
I followed the code and can see that the $atts['class'] = 'dropdown-toggle nav-link';
I can also see that the HTML in side of $item_output
contains the proper classes.
If I place the dropdown class in the WordPress menu on that item the icon shows under the link.
My Walker code
wp_nav_menu(array(
'menu' => 'main-menu',
'theme_location' => 'main-menu',
'menu_id' => 'navigation',
'depth' => 3,
'container' => false,
'escape_titles' => false,
'menu_class' => 'navbar-nav mr-auto',
'walker' => new WP_Bootstrap_Navwalker()
));
I was logging this at work, but I no longer work there.
But I do still use this package so let me double-check!
@IanDelMar I still don't have the carrots.
Over the next few days, I will see if I can track it down.
I know that if you follow the execution you do have the proper CSS but at some point, it gets removed.
@adampatterson Any news on this issue?
Closing this as the mentioned behavior is still not reproducible. Please re-adress the issue if it comes up again.
@IanDelMar Hey, Sorry for the long delay.
After much digging, I came across the culprit, there was a filter nav_menu_css_class
that set the LI links to nav-item
removing the data-toggle
!
@adampatterson Thanks for the feedback!