Support » Fixing WordPress » No menu's on Tag page (with Xili Language Plugin)

  • Hi All,

    I have a problem loading menu’s with the wp_nav_menu() function in combination with Xili Language, although I’m not sure if that is the problem. The problem seems to only exist on the tag.php page, on all other pages the menu loads fine. I have narrowed it down to this function in nav-menu-template.php in the wp-include folder.

    // If the menu exists, get its items.
    if ( $menu && ! is_wp_error($menu) && !isset($menu_items) )
    	$menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'update_post_term_cache' => false ) );

    The thing is that $menu->term_id always has the same ID, but for some reason the $menu_items objects that is being returned is empty on the tag.php page but not on the index.php page for example, while the term_id is exactly the same. As it is the only variable that is being passed in the function I’m kind a confused where the problem might be. In theory it should return the same object but it doesn’t. On tag.php $menu_items is empty.

    Anybody any idea what might be the problem?

  • The topic ‘No menu's on Tag page (with Xili Language Plugin)’ is closed to new replies.