Hello all,
If you using depth = 3:
wp_nav_menu( array(
'menu' => 'main-nav',
'theme_location' => 'main-nav',
'container' => 'div',
'depth' => 3,
'container_class' => 'collapse navbar-collapse',
'container_id' => 'bs-example-navbar-collapse-1',
'menu_class' => 'nav navbar-nav',
'walker' => new wp_bootstrap_navwalker()
)
);
You can monitor file wp_bootstrap_navwalker.php add <span class=”caret”></span>
1. Replace: if ( $args->has_children && $depth === 0 ) { // Line 84
To : if ( $args->has_children && $depth === 0 || $args->has_children && $depth === 1) {
2. Replace: $item_output .= ( $args->has_children && 0 === $depth ) // Line 108
To: $item_output .= ( $args->has_children && 0 === $depth || $args->has_children && 1 === $depth)
======
– If you can’t monitor it. I can help you.
– My skype: nguyenlehuutai90