Using two menus in WordPress theme

I am trying to create a WordPress theme with two menus.

In functions.php I have registered the menus:

Read More
register_nav_menu('main', 'Main navigation menu');

register_nav_menu('topmenu', 'Top navigation menu');

And in my theme header I have called them:

<?php wp_nav_menu( array('menu' => 'main' ) ); ?>

<?php wp_nav_menu( array('menu' =>  'topmenu' ) ); ?>

However, the ‘main’ menu shows up in both locations.

Any ideas what I am doing wrong?

Related posts

Leave a Reply

1 comment