Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8526

    I need to use multiple ‘main’ menu’s, is there an option to achieve this?

    I added this code to the functions.php to create multiple menu options:

    if (function_exists(‘add_theme_support’)) {

    add_theme_support(‘menus-test’);

    }

    if ( function_exists( ‘register_nav_menu’ ) ) {

    register_nav_menus( array(

    ‘menu1′ => ‘Menu 1 name in back-end’,

    ‘menu2′ => ‘Menu 2 name in back-end’,

    ‘menu3′ => ‘Menu 3 name in back-end’

    ));

    }

    But I dont know the exact code to input in the header.php to display the specific menu’s. Any suggestions?

    I tried:

    <?php wp_nav_menu( array( ‘theme_location’ > ‘menu2′, ‘container’ > ” ) ); ?>

    But it keeps loading the theme’s main menu :-(

    #61688

    Ah I got it allready, this is the code to display the menu:

    <?php wp_nav_menu( array( ‘container_class’ => ‘class_name’, ‘theme_location’ => ‘menu2′ ) ); ?>

    #61689

    Hey,

    glad that you found a solution. You can also use Kriesi’s framework to register the menu. Just add your menu to the config variable in functions.php:

    $avia_config['nav_menus'] = array('avia' => 'Main Menu', 'avia2'=> 'Sub Menu');

    i.e. like:

    $avia_config['nav_menus'] = array('avia' => 'Main Menu', 'avia2'=> 'Sub Menu', 'avia3'=> 'Sub Sub Menu');

    #61690

    Hotspot, where does that line of code go in the header?

    #61691

    @GDHMedia

    Just place the code in a div in the location you want the menu to appear.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Multiple menu's’ is closed to new replies.