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.

I have a question regarding something that is not working properly, I have a menu that is not working, currently with my theme I have 10 menus, one being the main nav and the rest are needed for special purposes, the thing is, the main one is not working, is taking the menu values from one of the other menus, but I'm sure I'm referring that menu in the right way.

In my header I'm calling my menu like this:

<?php wp_nav_menu( array('menu' => 'Main', 'menu' => 'menu_center' )); ?>

And in my functions.php I have this:

add_theme_support('nav-menus'); 
if ( function_exists('register_nav_menus')) {
    register_nav_menus( array(
        'main' => 'Main Nav',
        /* FOOTER MD USA */
        'footer-opinion' => 'Footer Opinion',
        'footer-noticias-economicas' => 'Footer Noticias Economicas',
        'footer-consumo' => 'Footer Consumo',
        'footer-empresas' => 'Footer Empresas',
        'footer-noticias-actualidad' => 'Footer Noticias de Actualidad',
        'footer-suplementos' => 'Footer Suplementos',
        'footer-finanzas' => 'Footer Finanzas',
        'footer-spotlight' => 'Footer Spotlight',
        'footer-otras-publicaciones' => 'Footer Otras Publicaciones'
    ) );
}

But the main nav menu is not working is displaying one of the footer menus and this is driving me crazy, any idea guys what I'm doing wrong?

Thanks!

share|improve this question
add comment

1 Answer 1

You have menu two times as parameter, you probably want:

wp_nav_menu( array('theme_location' => 'main', 'menu' => 'menu_center' ));




Edit:

From your comments I'm getting that you're missing some information about the whole topic, e.g. the difference between the description and the name of a menu. To resolve this you really should just read the according documentation thoroughly:

share|improve this answer
    
Thanks for the edit and for the response, in your example you have theme_location, should I leave that like you suggested? –  Arturo Nov 29 '13 at 22:23
    
One thing I noticed is this, when I try to load the new theme and add the new menus it keeps the old menus from the old theme –  Arturo Nov 29 '13 at 22:24
    
You don't need theme_location, I was just assuming this might be what you want. –  ialocin Nov 29 '13 at 22:26
    
Thanks, then, sorry but this should be like wp_nav_menu( array('Main Nav' => 'main', 'menu' => 'menu_center' ));? –  Arturo Nov 30 '13 at 1:27
    
Sorry mate, I actually can't see the difference, too late. Have you read wp_nav_menu() @Arturo –  ialocin Nov 30 '13 at 1:33
show 2 more comments

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.