[SOLVED]
IT DOES NOT WORK when you are referring to an inexisting location. e.g. when you copied the code from somewhere else, or you haven’t created your menu or location yet in the dasboard.
e.g. remove “, ‘theme_location’ => ‘primary'” from the following code:
wp_nav_menu( array( 'container'=> false, 'menu_class'=> false, 'menu_id'=> 'ia_toplevel', 'theme_location' => 'primary' ) );
so it shoult look like
wp_nav_menu( array( 'container'=> false, 'menu_class'=> false, 'menu_id'=> 'ia_toplevel' ) );
It works fine WITHOUT container in my website SocialBlogsiteWebDesign.com
Related Posts:
- Bootstrap dropdown nav pills not working with wp_nav_menu()
- How to register custom menu widget
- Menu items id’s – are they 100% unique?
- How to var_dump nav menu items from anywhere?
- Show different different menu in theme_location depending on x
- Make Theme automatically choose default nav menu
- Change menu with language?
- Adding Additional Menus In Genesis Child Themes
- Jump links to another page and return back to the first page anchors successfully
- Custom Menus Description Stripping HTML Tags
- How to Create a Custom WordPress Navigation Menu with the Code?
- Show all parent pages and their children below from same author as currently viewed page
- How can I get an array/list of all current WordPress Admin Menu items?
- wp_get_nav_menu_items vs wp_nav_menu
- Does WordPress create mobile menus automatically?
- Remove Page Name From WordPress Menu
- Hiding Menu From Specific Pages
- How can I remove data-target=”#” from bootstrap dropdown menu?
- Use wp_nav_menu to display ALL pages
- Custom dashboard menu does not stay open for the custom Taxonomy within it
- How do I hide one menu item link for logged in and logged out users [closed]
- remove everything from wp_nav_menu
- Menu Item Location
- get_query_var(‘post_type’) not returning in a filter
- How do I apply a class to custom menu items based on user roles
- Menu API not switching menus?
- Can I insert elements anywhere into the results of wp_nav_menu()?
- Navigation Menus Depth for specific menus
- How do you manage large menu hierarchies in WP?
- Using Walker To Add Menu CSS Class Functionality
- How to include the parent page link in this wp_nav_menu walker
- how can remove this element to avoid having two menu buttons with one that shows unnecessary pages
- How to make next and previous button based on a menu
- How to combine multiple categories in one Menu item?
- WordPress Menu Walker: add #hashes to child page links (only)
- add_filter on menu items to add a menu item
- WordPress Walker – Group two items?
- Custom Menu’s – Disable Link checkbox
- Unlimited WordPress Menu
- How to show dynamic side bar on menu item [closed]
- Using my WordPress menu on another platform
- Header and nav menu problem on Thesis site [closed]
- Remove a menu sub-item
- How to remove menu labels in word press?
- modify menu item links dynamically
- Adding numbers inside a span tag in nav menu [closed]
- I’m using wp_nav_menu to display my menu, but I want one more link in there that is a hardcoded link. How can I do this?
- Is there a hook for nav menu item links to add custom css programatically?
- WordPress Menu adds an unwanted slash before anchor
- Disable parent in wp_list_pages – WordPress
- Add scheduled page or post in the menu section on back-end
- Hoverable menu to appear in different sections of page
- How to automatically redirect to first item of second navigation level in a multi-level menu?
- Show Sidebar Menu Subpages When Clicking Parent
- Secondary menu in WP 4.5
- Change link in menu on condition
- How to undo the last changes to a custom menu?
- Current User In Custom Menu Item URL [closed]
- Creating other page than page.php
- add_menu_page does not render the expected result
- Custom menu styling
- Getting the WordPress custom menu titles and outputting them in a theme
- Second Level Menu
- Additional navigation bar in header
- Dynamically populate the menu when a new category is created
- Is there any difference between widgets (used in order to manage menus) and register_nav_menus() in terms of performance?
- Menu items not clickable
- How do you show horizontally the submenu in WordPress using the nav walker?
- Adding menu title to custum URL
- Parent Menu Item Requires Two Clicks for Mobile Device
- Add “onclick” option to header menu item
- Full submenu not displaying in wordpress
- Mobile menu not working – jQuery error?
- Product categories are mixed when creating menu
- How can I make menu items into two seperate buttons with different functions?
- Responsive Dropdown Menu
- Header lists posts instead of showing primary nav menu
- How to separate sub-menu output and keep associated with parent
- Eliminate menu collapse button on website
- Best way to build a 500 item menu
- Count Level 1 Childs for Custom Nav Walker WordPress
- Iterate through each menu item into a shortcode
- Showing main menu and child menu in diffent places in a same page
- “Static” Child Menu with Accordian
- Display same menu for parent and all its children
- Image menu on responsive WordPress
- Set a different home link in nav menu
- Remove link from Page name in navigation bar
- Auto Filled Custom Menus for Custom Post Types?
- How to view menu and submenus in URL
- Permalinks linking to similar named site
- Adding Pages to Menus – No Page Hierarchy in Backend [duplicate]
- I want my homepage navbar to have different styling to the rest of my site, how can I do this?
- Custom navigation / menu output (walker?)
- How does WP knows which template to use for a page
- Problems with draft website pages
- What is the best way to incorporate responsive dropdown navigation menu into custom theme?
- Submenu items not working anymore
- Icon not shown in Dropdown menus in Twenty Seventeen Theme
- How to change WP menu item type?