Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In my menu area of the word press admin I have access to place links in both the h "main menu" and the "footer links"

register_nav_menus(array(
    'main_nav' => 'The Main Nav',
    'footer_links' => 'The Footer Links'
));

In the Header:

wp_nav_menu(array('menu' => 'The Main Nav'));

In the Footer:

wp_nav_menu(array('menu' => 'The Footer Links'));

In the header Nav, I have a link to the default sample page, in the footer I have a link to google. I save the menus and look at the front end, I get the sample page link in both the header and the footer.

for further proof that I have two menus:

enter image description here

What's going on?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

The correct way to get a specific menu is the 'theme_location' parameter:

wp_nav_menu(array('theme_location' => 'main_nav'));
wp_nav_menu(array('theme_location' => 'footer_links'));
share|improve this answer
    
Thought so, I read something on that, i though menu would do the same –  TheWebs Apr 7 '13 at 17:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.