I am running into an issue with the custom menu feature. I am creating my first theme on my personal development setup, not on a live site so I cannot link you to it.
I add
<?php
if (function_exists('add_theme_support')) {
add_theme_support('menus');
}
add_action( 'init', 'register_my_menus' );
function register_my_menus() {
register_nav_menus(
array(
'header-menu' => __( 'Header Menu', 'bbprod' ),
'footer-menu' => __( 'Footer Menu', 'bbprod' ),
)
);
}
?>
To my functions.php and I add
<?php wp_nav_menu( array( 'header-menu' => 'header-menu' ) ); ?>
and
<?php wp_nav_menu( array( 'footer-menu' => 'footer-menu' ) ); ?>
to the header.php and footer.php respectively.
However, when I use the appearance > menu page. The first menu I create gets assigned to both locations, and no matter how many menus I make and save to the GUI locations the first menu is the only one that will appear on the site.
How do I fix this? Any help would be greatly appreciated.