WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

Your Answer


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

Browse other questions tagged or ask your own question.