Alright so I've got two navigation menus that I've registered with my theme:
<?php
if ( function_exists('register_sidebar') )
register_sidebar();
add_theme_support( 'menus' );
if ( function_exists('register_nav_menu') ) {
register_nav_menu( 'primary_nav', 'Primary Navigation');
register_nav_menu( 'secondary_nav', 'Secondary Navigation');
}
?>
Functions.php
And then Beyond that I've got two places in my header where I display the navigation menus:
<!-- BEGIN: Navigation Menu primary_nav (Primary Navigation) -->
<?php
if(function_exists('wp_nav_menu'))
{
wp_nav_menu(
array(
'menu' => 'primary_nav',
'container' => '',
'depth' => 1,
'menu_id' => 'menu'
)
);
}
else
{
?>
<ul>
<?php wp_list_pages('title_li=&depth=1'); ?>
</ul>
<?php
}
?>
<!-- END: Navigation Menu primary_nav (Primary Navigation) -->
</div>
header.php - Location 1
<!-- BEGIN: Secondary Navigation Menu -->
<?php
if(function_exists('wp_nav_menu')) {
wp_nav_menu(
array(
'menu' => 'secondary_nav',
'container' => '',
'depth' => 1,
'menu_id' => 'secondary_nav_id'
)
);
}
else {
?>
<ul>
<?php wp_list_pages('title_li=&depth=1'); ?>
</ul>
<?php
}
?>
<!-- END: Secondary Navigation Menu -->
header.php - Location 2
In the admin page for the theme everything shows up just fine, both menus appear in the list both Primary Navigation and Secondary Navigation.
And from the admin screen I've added two distinct sets of menu items. However, whenever I load up my theme, for some reason I end up with only the menus from the Primary Navigation appearing twice.
Is there something I've forgotten that would cause this behavior?