1

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?

5

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' ) ); ?>

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.