Issue with custom menus
-
Hi,
I am having a strange problem with a theme I am developing in that as part of the theme I have defined two menu areas a main nav and a footer nav. I have defined these in my function.php file as follows:
if (function_exists('register_nav_menus')) { register_nav_menus( array( 'main_nav' => "Main Nav Menu", 'footer_nav' => "Footer Menu" ) ); }
Now within my theme I can see that it now supports two navigation areas:
http://awesomescreenshot.com/0d5499k9b
And within my header.php and footer.php I have defined the following:
<div id="nav-bar"> <ul class="cf"> <?php wp_nav_menu( array( 'menu' => 'main_nav', )); ?> </ul> </div>
and
<ul class="menu cf floatLeft"> <?php wp_nav_menu( array( 'menu' => 'footer_nav', )); ?> </ul>
However both menus areas always show the main menu even if from within the menus area I have defined one to us main and the other to use footer. Even more confusiing if I leave both of these blank I’d expect to see no menu displayed in these areas but it always displays the main menu.
Would appreciate some advice as to where I might be going wrong.
- The topic ‘Issue with custom menus’ is closed to new replies.