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 template I'm using calls like this to output some custom menus:

<?php wp_nav_menu(array('container_class' => 'secondary-navigation', 'theme_location' => 'secondary')); ?>

Ever since upgrading to WordPress 3.1.4 I get the full list of pages output on instead of the custom menu

I've seen fixes (via google) saying I should add the following to fix this:

'fallback_cb' => false,

While I understand why this might fix things for some people, when I do the menu doesn't output at all (not just unstyled content, no html is echoed).

My theme is heavily based on the twentyten default theme (from a code point of view), so I guess my question is does anyone have a fix which doesn't involve setting the fallback callback to false...

And/or does anyone know if this issue also exists in the latest RC for the new version?

share|improve this question

migrated from stackoverflow.com Jul 4 '11 at 19:35

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Are you sure you have created that menu and associated it with with "secondary" menu location? Just asking...

share|improve this answer
    
Yes I have, as far as I can tell I've done everything by the book –  CoderChris Jul 10 '11 at 10:41
    
If you get no output when adding 'fallback_cb' => false, that means that there is no menu applied to the specified Theme Location. I think @Daniel Sachs is correct here. Go to Dashboard -> Appearance -> Menus and verify that a menu is applied to the secondary Theme Location. (Also: what does your register_nav_menus() call in functions.php look like for this Theme Location?) –  Chip Bennett Sep 3 '11 at 14:29

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.