The following should setup your menu with the correct classes and IDs applied to your container and ul. The codex entry for wp_nav_menu lists all the possible arguments.
wp_nav_menu( array(
'theme_location' => 'primary',
'container_class' => 'menu-menu-container',
'menu_id' => 'menu-menu',
'menu_class' => 'btn-group'
) );
You can then add the required classes to the menu items by using the nav_menu_css_class filter.
function my_special_nav_class( $classes, $item ) {
$classes[] = 'btn btn-default';
return $classes;
}
add_filter( 'nav_menu_css_class', 'my_special_nav_class', 10, 2 );
Related Posts:
- adding some custom html code to the wp_nav_menu function
- Multi Level Bootstrap Navigation Menu in WordPress
- How do I add the data-toggle=”modal” data-target=”#myModal” attribures to a WP Nav bar?
- Bootstrap drop down menu with wp_nav_menu
- wordpress nav menu using twitter bootstrap
- HTML Bootstrap navigation menu to WordPress menu using wp_nav_menu
- Output the aria-labelledby parameter for a nav menu child
- Add Bootstrap dropdown class to a nav menu
- Nav walker, bootstrap: Display 3rd level items under 2nd level
- Make compatible custom menu widget for Twitter Bootstrap
- Loop through Navbar, Output Icons
- How can I remove data-target=”#” from bootstrap dropdown menu?
- Make menu bootstrap compatible
- Main Menu and Sub Menu Items for Footer
- How to add class to and childs of sidebar widget – WordPress
- How to have two menus using Bootstrap nav walker?
- Side Menu Icon Expandable
- WordPress Walker – Group two items?
- Sticky Header in WordPress using BootstrapWP theme [closed]
- WordPress + Bootstrap [closed]
- wp_nav_menu not displaying the right way
- wp_get_archives doesn’t take effect from css or html
- Make two bootstrap menus collapse into one dropdown
- WP nav menu + Bootstrap, add role=”menu” to UL
- Responsive menu on genesis theme [closed]
- Bootstrap menu – make menu entries with submenu not clickable
- Bootstrap Menu bar shows up a toggle in Desktop Mode
- WordPress + Bootstrap: Replace primary navigation menu on mobile?
- Stuck while adding bootstrap navwalker class
- How to use Bootstrap Navbar in wordpress Nav Menu
- Navbar is hidden behind carousel when using wp-boostrap-navwalker
- How to create a mobile menu full screen overlay using Understraps Bootstrap 4 theme
- Bootstrap Nav Walker Sub Menu Image
- Change menu for mobile
- How to change navwalker’s dropdown mark-up?
- Bootstrap navbar responsiveness on WordPress theme menu not working
- My WordPress menu based on Twitter bootstrap creates menu-item and not page-item
- Broken drop down menu using Bootstrap and navwalker class
- nav tag wrapping around dropdown
- Convert a custom bootsrap based menu to wordpress nav walker
- WordPress nav Walker – Bootstrap 5.2.3 – submenu not opening
- Generate a Menu that Displays Child Pages using wp_list_pages() with the New Menu Functionality in WordPress 3.0?
- How Does The Walker Class Work?
- WordPress Shortcode in Menu Item Title
- Calling the Menu Title within wp_nav_menu array function
- How to hide an item from a menu to logged out users (without a plugin)
- Large WP 3.0 menu times out and won’t save
- How to apply a class to the second word in menu list item?
- WordPress wp_nav_menu within iFrame
- Generate a Menu that displays all child pages of top level parent
- Terms with more than one occurrence have current-menu-item class in menu
- start_lvl on Walker is not working
- How to get Menu Navigation Labels to output HTML
- wp_nav_menu doesn’t generate parent/ancestor classes
- Pending Custom Link in Menu
- Benefits of using Nav Walker?
- Social Links Menu displays icon instead of text (twentyfifteen) [closed]
- has_children in custom nav_walker
- How to add wechat (weixin) link to navigation menu?
- Multiple WordPress Menus that will only display all pages
- Link that refers to a menu item with dynamically generated URL
- Custom walker nav – Add sequential number as class
- delete all post with certain meta_keys
- Make nav-menus.php available for editor
- how to add custom wp_nav_menu class css selector to ul and a tags?
- Split into two seperate unordered lists with custom walker
- Use dashicons in menu items?
- Problem adding ‘has-children’ class to wp_nav_menu
- exclude pages in custom menu
- wp_nav_menu() | Outputting my own custom code using built in features
- How to reference argument data for wp_nav_menu() from functions.php
- Creating menu always gives error A name is required for this term
- Showing the same menu in multiple location
- Expected snippet value not showing
- Wp Nav Menu div containers
- wp_nav_menu with WP as pure CMS
- Simple form to add custom links to menu?
- Making the menu toggled open on mobile devices Illustratr theme
- How to include second layer sub menu to Walker Nav?
- How can I creat custom menu with bootstrap
- Restrict user to edit only edit a certain menu
- Where is the source code in the console coming from?
- Migrate old blogroll to menus automatically
- Getting parent object_id of child menu items in WordPress menu
- How to remove a sub-menu using walker hooks/filters without relying on a custom walker?
- Calling wordpress menu outside ignores custom menu item
- Specific Page that convert Hyperlink to anchor in nav menu
- Next page link via the custom menu
- How can I make this custom design menu work in wordpress?
- Active menu item / category
- Add different span class to wp nav menu
- Menu not always using correct link
- Custom Menus and taxonomies
- How to add a class name to the ancestor of a post?
- How we show pages in dropdown
- wp_nav_menu doesn’t show on index page
- Automatically add new posts to a specific menu name
- can anyone help me converting my static menu to wp_nav_menu I’am trying to add static menu item to WordPress Menu
- Elegant way of adding an CTA to a menu
- How to set menu Display location