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 three nav menus and for some reason under tags archive wp_get_nav_menu_items('MenuName') returns an empty array.

Frontpage, posts, pages are OK, but when you go into tags archive, no items are returned.

Here is my code in functions.php:

function vp_get_nav_items() {

    $items = array();

    $items['foo'] = wp_get_nav_menu_items('foo');

    $items['bar'] = wp_get_nav_menu_items('bar');

    $items['xoo'] = wp_get_nav_menu_items('xoo');

    return $items;

}
share|improve this question
    
My guess would be a filter is interfering but do you have debugging information? –  s_ha_dum Sep 11 '13 at 14:02
    
I have wp-debug turned on and showing all PHP errors and notices, but nothing comes up. –  Henryk Sep 17 '13 at 15:53
    
I tried with TwentyThirteen theme too, and still it doesn't work. Seems like it's a bug in wp-includes/nav-menu.php. –  Henryk Sep 17 '13 at 15:58
    
This works fine for me on the tag archive in Twenty Thirteen. The problem is elsewhere. Perhaps post the code in context-- ie. post where/how the function is used. –  s_ha_dum Sep 17 '13 at 16:43
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.