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.

I am running WP 3.2.1 on a dedicated server and having a little trouble with a second menu.

I have a menu at the top of the page which is working fine but I've added a secondary left menu to the left column which is currently showing the top menu despite it being selected in the admin to show the left menu.

In my functions.php I have:

register_nav_menu( 'left-menu', __( 'Left Menu', 'rsi' ) );
register_nav_menu( 'top-menu', __( 'Top Menu', 'rsi' ) );

Then in my theme files I've called them up using:

<?php wp_nav_menu( array('rsi' => 'left-menu' ));?>
<?php wp_nav_menu( array('rsi' => 'top-menu' ));?>

What am I missing?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

You need to pass an array of menus to the register_nav_menu function like so:

register_nav_menus(
    array(
        'menu-1' => 'Menu Top',
        'menu-2' => 'Menu Bottom'
    )
);

You then call them in your theme:

<?php wp_nav_menu( array( 'theme_location' => 'menu-2' ) ); ?>
share|improve this answer
add comment

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.