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() {
            'left-menu' => __( 'Left Menu' ), 
            'right-menu' => __( 'Right Menu' )

add_action( 'init', 'register_mp_menus' );

Any ideas or help would be greatly appreciated!


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

wp_nav_menu( array(
   'theme_location' => 'left-menu',
   'menu' => 'Left Menu'
); ?>
| improve this answer | |

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.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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