Second menu not showing

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.

Read More

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?

Related posts

Leave a Reply

1 comment

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