Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

tainguyen

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: WordPress #2844
    tainguyen
    Participant

    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

Viewing 1 post (of 1 total)