it turns out that after copying some code from another post (http://stackoverflow.com/questions/9439877/adding-menu-items-in-wordpress) for a filter in functions.php to add the search bar in the nav menu, when it wasn’t matching the menu, it was returning nothing (i.e erasing the $items)
I stupidly copied this code in without testing… and it was the problem all along!
Related Posts:
- Split up wp_nav_menu with custom walker
- how to create a menu with all sub categories?
- How to avoid wp_nav_menu() ID conflict?
- Remove unusable metaboxes in nav menu management screen
- Highlight parent menu item when child is not in menu
- Allow html tags in WordPress Custom Menus Description Field
- Add custom attribute to menu item link using Filter
- Remove nav menu or menu item
- Creating new dynamic menu including BP links [closed]
- Building a Sub-menu: Display Parent Category/Page’s Children When Viewing Children
- List parent item with all child item on child pages
- Getting stripos error when trying to add menu classes
- Output the aria-labelledby parameter for a nav menu child
- Hide menu items for visitors and filter based on role
- Add a “has-children” class to body tag?
- Custom Nav Walker sub-menu HTML construct
- How to remove trailing tags from wp_nav_menu walker
- Custom Walker for Walker_Nav_Menu
- Different side menu on each page
- How to scroll item in the Menu setting effectively?
- Building custom API and using wp_get_nav_menu_items to get menu items. Only works when logged in, returns nothing when I’m not
- Appearance -> Menu -> Menu Structure : Add plain HTML code as an element
- Replace menu permalink/hyperlink with only menu name/slug
- wp_nav_menu add some element to container
- get_search_form() doesn’t appear to take parameter into account
- Custom menu deletes itself
- Pass GET params to URL from a main menu item
- show different admin menu to different user roles
- How to include a third level with wp_get_nav_menu_items function
- Schedule Page to Menu [duplicate]
- Bulk Custom Menu and Wp-Ecommerce
- Show Menu from one WordPress install in another WordPress install
- Check if Page Already Exists in Menu
- Reuse a custom WordPress menu on another WordPress website
- How to dynamically populate a dropdown
- Is this format possible with a custom Nav Walker class?
- Default WordPress menu content
- Add code to WordPress menu items by class
- how do i change the text under a navigation menu [closed]
- How do you add a around the second level of a Menu?
- Remove admin menu
- Limit User Iinterface for Admin?
- Creating menu and breadcrumb “sections” within WordPress 3 being used as a CMS
- Hide menu from homepage
- Three menus – parent / child / sibling
- WordPress Nav Walker – Top menu link with dropdown link not clickable (dropdown opens)
- swap out only main menu for logged in users
- Menu Not Showing on Mobile
- Add custom class to li element which has children
- How to Show Different Menus to Logged in Users in WordPress [duplicate]
- Unable to get menu pattern using a walker
- Menu not adding the right items
- get only the item you click on
- Output Post ID for all nav_items
- Custom ul class
- wp_nav_menu inside an object — how do I deal with fallback_cb?
- Splitting up a submenu into columns, or putting existing menus in another menu as submenu item
- Walker_Nav_Menu creating too many closing tags?
- Can’t insert internal links and menu errors appearing
- horizontal menu / 4-level depth
- Theme Menu vs Native Menu
- Mobile navigation javascript problem
- Custom menu including also primary menu items
- open menu link (PDF) in new tab not download
- twentysixteen child theme – responsive menu – ham icon button not working – Cannot read property ‘classList’ of null
- How to add Loginout to Sub-menu
- having a page in multi sub-menu and match current-menu-item
- PHP Warning adding menu
- Customize version different to Live version
- Sub-Items Not Visible in Navigation
- Custom menu with Walker class – what should the $db_fields be?
- Editing/Removing Secondary Menu from Divi
- Menu Button that link to different pages for unique user?
- Change “login/register” to “useraccount” when a user has logged in
- Question regarding register_nav_menus();
- Making wordpress menu horizontal [closed]
- nav_menu: how to force a subpage switching on the parent menu
- wp_dropdown_nav function to list menu items
- Hardcoding links to wp_nav_menu
- wp_nav_menu() reutrns HTTPS?
- Creating and populating custom nav menu (menu-item-position not working)
- Hide page link in main menu from anonymous users
- load wp_menu dynamically with enquire.js
- How to make a page to not appear in the menu when created?
- WP NAV MENU – Dropdown always showing
- Can’t style custom menu
- custom walker to add iconfont to wp_nav_menu
- wordpress 3.4.2 + wp_nav_menu + chunk theme not working [closed]
- Convert HTML code to WordPress menu
- How to view menu and submenus in URL
- Permalinks linking to similar named site
- wp nav menu – highlighting current page not working properly [closed]
- Hamburger Navigation Menu
- Custom navigation / menu output (walker?)
- How does WP knows which template to use for a page
- register_nav_menus and wp_nav_menu issue, not displaying independent menus
- Convert a custom bootsrap based menu to wordpress nav walker
- How do I get the menu items based on name or ID?
- Menu problem : when add wordpress element in menu it convert into empty custom link
- Problems with the navigation menu