As I am using the roots theme framework, this line removes the container argument:
function roots_nav_menu_args($args="") {
$roots_nav_menu_args = array();
$roots_nav_menu_args['container'] = false;
if (!$args['items_wrap']) {
$roots_nav_menu_args['items_wrap'] = '<ul class="%2$s">%3$s</ul>';
}
if (!$args['depth']) {
$roots_nav_menu_args['depth'] = 2;
}
return array_merge($args, $roots_nav_menu_args);
}
add_filter('wp_nav_menu_args', 'roots_nav_menu_args');
Related Posts:
- Add custom classes to anchor in wp_nav_menu
- Select menu on browser resize
- Displaying wp menus by name without using theme locations
- How to highlight the current page in the nav menu?
- Setting a Default ‘Theme Location’ When Creating a Menu
- Custom Nav Walker Displaying Values in Sub Menu
- Where is definied the theme location for the main menu in a WordPress template?
- My Admin bar covers my sticky navbar [closed]
- How to make theme elements customizable in wordpress?
- Where am I doing wrong in my theme menu?
- Admin: sub menu doesnt display under apperance when activate my themes
- 3 Level Deep Navigation Menu Not Showing All Levels
- How to add menù section to my WordPress template?
- Thesis -style Navigation
- Some doubts about WordPress handle the horizontal main menu visualization
- how to create/register menu items that can be added to menus later
- Why nav_menu_css_class doesn’t work with apply_filters?
- Theme: dropdown hover menu not showing up in IE/Edge
- Menu names not getting translated
- Primary Menu Showing All Pages With No Sub-Nav
- What’s the policy for building a theme that doesn’t support widgets/menus?
- How to make navigation a list without a plugin? [duplicate]
- How to automatically set a Template Page Name next to a page in menu screen such as WooCommerce pages, front page, or posts page in wordpress?
- Dynamic nav menu with icons [closed]
- How to add posts to custom menus?
- How to add custom css file in theme?
- Display Menu Name using wp_nav_menu
- get_template_part vs action hooks in themes
- How to remove search bar from a wordpress theme? [closed]
- Get url of thumbnail from the media uploader
- Template for individual post designs
- Best practice way to implement custom sections into a WordPress theme
- How to use logout function on custom menu link?
- Problem with registering menus – What to do when other solutions aren’t working?
- Pushing updates to your premium theme
- Where can I find a good reviewed collection of Twenty Ten child themes?
- Front End Post Submit Form
- CSS in child theme not overriding the parent theme [closed]
- How to add (css) classes to only one wp_nav_menu()?
- How to add dynamic inline style?
- Optimal solution to develop a wordpress theme?
- How to add suggest plugin to theme?
- Do I really need the div class entry?
- Am I supposed to create a child theme for every theme I use?
- using wordpress without javascript
- Theme Check: Could not find post_class
- Why wp_head() function not loading style.css?
- Override theme programmatically
- Set multiple templates per post
- WP 3.1 upgrade breaks AutoFocus+ theme
- How can I display/hide certain content based on a Theme Option field?
- create-guten-block in wordpress theme?
- WordPress navbar with logo in middle [closed]
- How can I make that when I clic on one of the menu items, that page shows only posts with the same category?
- wp_post->post_parent object returning 0
- Theme Splash Image within the “Appearance -> Themes” control panel [duplicate]
- Theme Loading Into Dashboard
- Which html elements should be styled in wordpress theme
- Folder name for a pro version of a WordPress.org theme?
- Are seven additional image sizes are too many?
- wp_nav_menu and its fallback
- registering a global template wordpress 6.0
- Copying the theme style files and images to duplicate the website but with a difference
- I have WordPress setup on primary domain, how do I set it up on its subdomain using the same database?
- Theme development – Automatically menu creation
- How to set Post meta-box defaults based on the choices made by user in Customizer?
- Theme Action to hook for one time only function [duplicate]
- Theme development: How to add CSS classes to menu items?
- How do I include a partial from a directory below a wordpress theme directory?
- Remove h1 from 2015 theme
- WordPress pulling in random page themes
- Can’t change theme name
- How to remove permalinks links presents in each page of my site?
- Parent/Child pages
- How to make a function occurs for one time?
- Archives and Categories in Custom Menu
- How do I restructure the comment HTML layout?
- Problem with pagination link (error 404)
- how to ensure responsiveness in wp themes? [closed]
- home is not working in wordpreess
- Is there a way to create sections under “Colors” panel in the Theme Customizer?
- Local theme changes upload on server but theme changes not showing
- Need help with adding custom wordpress menu and sub-menu
- WordPress Custom font not found
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- New created Theme leads to malfunctioning Xampp Apache –> functions.php is cause
- Magnific Popup – Add Caption to Images
- Why do WordPress developers use so many opening and closing PHP tags when developing themes? [duplicate]
- Safe way to echo wp_trim_words
- How can I demonstrate themes well?
- How to update my own theme?
- WordPress custom jquery not found
- Custom link color or stylesheets
- How to highlight current menu bar base on the URL?
- How to remove proudly created by WordPress in theme?
- Roll my own theme or customize an existing one [closed]
- Why do some sites show themes/”themename” as the only theme?
- How to make a multilingual wordpress site to be translated one-to-one without much effort and without using translate?
- Is there a way to have WordPress autodetect page templates in the page-templates directory and any sub-folders?
- My wordpress site memory exhausted more than 1GB trying to debug with default