wp-bootstrap / wp-bootstrap-navwalker

A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.
https://wp-bootstrap.github.io/wp-bootstrap-navwalker/
GNU General Public License v3.0
3.37k stars 1.94k forks source link

Secondary menu acts like primary #186

Closed RvMouche closed 9 years ago

RvMouche commented 9 years ago

Not sure if this is a bug or I'm doing something wrong, but I added this code to functions.php

// Bootstrap Navigation Walker
include get_template_directory() . '/external/wp-bootstrap-navwalker/wp_bootstrap_navwalker.php';
register_nav_menus( array(
    'primary' => __( 'Hamburger Menu', 'BasicBootstrap' ),
    'secondary' => __( 'Top Menu', 'BasicBootstrap' ),
) );

and this to declare the menu:

<?php 
            /* Secondary navigation */
              wp_nav_menu( array(
              'menu'       => 'secondary',
              'depth'      => 2,
              'container'  => false,
              'menu_class' => 'nav navbar-nav top-menu',
              'walker'     => new wp_bootstrap_navwalker())
              );
          ?>

But it still loads another menu, that I called Hamburger menu, how original right? Do you have any idea why?

RvMouche commented 9 years ago

Stupid... Needed to use name instead of location. Closed