I am trying to create a WordPress theme with two menus.
In functions.php I have registered the menus:
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?
You needs to login to WordPress dashboard. Click Menus from left side.
You can see Theme Location options there. Set the menu there.
Read this codex section