I'm using this nav walker in my Wordpress project. I want to create multilevel menu, for example. What I need to change to get it work? Or maybe is it another walker for BS4 with multilevel menu support?
Menu Item
- Sub menu
-- Sub menu item
-- Sub menu item
Menu Item
Add this css
ul.dropdown-menu li > ul.dropdown-menu{
left: 100%;
top: 0;
}
ul.dropdown-menu li:hover > ul.dropdown-menu, ul.dropdown-menu li:focus > ul.dropdown-menu{
display: block
}
Remove this code && 0 === $depth
from class-wp-bootstrap-navwalker.php
original code:
if ( isset( $args->has_children ) && $args->has_children && 0 === $depth && $args->depth > 1 ) {
After editing:
if ( isset( $args->has_children ) && $args->has_children && $args->depth > 1 ) {
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With