Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Not sure where my error is (I did piece most of this together from snippets on different websites,) but when I test my theme, only "Left Menu" displays. There are definitely two menus, however where "Menu Right" should be is a duplicate of "Menu Left."

Here's my header

<nav id="navigation" role="navigation">
   <?php wp_nav_menu( array('menu' => 'Left Menu' )); ?>
   <?php wp_nav_menu( array('menu' => 'Right Menu' )); ?>
</nav><!-- /Navigation -->

And here's my functions.php

function register_mp_menus() {
register_nav_menus(
array( 'left-menu' => __( 'Left Menu' ), 'right-menu' => __( 'Right Menu' )));
}

add_action( 'init', 'register_mp_menus' );

Any ideas or help would be greatly appreciated!

share|improve this question

2 Answers 2

You need to define the theme location when displaying with wp_nav_menu, i.e.:

<?php
wp_nav_menu( array(
   'theme_location' => 'left-menu',
   'menu' => 'Left Menu'
    )
); ?>
share|improve this answer
    
Recommended Reading: codex.wordpress.org/Function_Reference/wp_nav_menu –  its_me Jul 13 '12 at 3:54

The correct code is:

<nav id="navigation" role="navigation">
   <?php wp_nav_menu( array('theme_location' => 'left-menu' )); ?>
   <?php wp_nav_menu( array('theme_location' => 'right-menu' )); ?>
</nav><!-- /Navigation -->

Then you need to activate the menus in your admin interface: Appearances->Menus. If you want them to be duplicates of each other you just assign the same menu in your admin interface.

:)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.