You need to target the appropriate theme_location
.
Assuming you’ve defined multiple nav menu locations using register_nav_menus()
in functions.php:
<?php
register_nav_menus( array(
'primary-menu' => 'Primary Menu',
'secondary-menu' => 'Secondary Menu'
) );
?>
Then you call wp_nav_menu()
using the appropriate theme_location
as defined above, along with any other relevant arguments, e.g.:
<?php
wp_nav_menu( array(
'theme_location' => 'primary-menu',
'menu_class' => 'topnav'
) );
wp_nav_menu( array(
'theme_location' => 'secondary-menu',
'menu_class' => 'subnav'
) );
?>
Also, note that some of your arguments, such as menu_order
, are not valid arguments for wp_nav_menu()
. Here are the defaults:
<?php $defaults = array(
'theme_location' => ,
'menu' => ,
'container' => 'div',
'container_class' => 'menu-{menu slug}-container',
'container_id' => ,
'menu_class' => 'menu',
'menu_id' => ,
'echo' => true,
'fallback_cb' => 'wp_page_menu',
'before' => ,
'after' => ,
'link_before' => ,
'link_after' => ,
'items_wrap' => '<ul id=\"%1$s\" class=\"%2$s\">%3$s</ul>',
'depth' => 0,
'walker' => );
?>