As recommended in a similar post: https://wordpress.stackexchange.com/a/156494/74343
1.) Create the menus as you want them, and name them as you like, as an example “mobile-menu” and “desktop-menu“.
2.) In your child theme in the header.php you could switch according to the wp_is_mobile() flag like this:
if ( wp_is_mobile() ) {
wp_nav_menu( array( 'menu' => 'mobile-menu' ) );
} else {
wp_nav_menu( array( 'menu' => 'desktop-menu' ) );
}
However I used the “WP Responsive Menu” plugin, which allowed me to select a menu for mobile as well. In the configuration of the “WP Responsive Menu” one needs to select the element NOT to show on mobile, which in the case of the twenty twelve theme is: “#site-navigation”.
Happy coding!
Related Posts:
- Second nav is merged with the first in mobile
- TwentyTwelve child theme mobile menu not working
- How to add a submenu toggle button inside all “li” elements that have a submenu?
- Add href to tag in nav menu for mobile
- Disable Top Nav Bar on Mobile
- Navigation menu, remove item from desktop
- Programmatically add a Navigation menu and menu items
- Dynamically exclude menu items from wp_nav_menu
- Call custom field into menu item
- Exclude Private, Draft pages from Primary Nav when using custom menu
- wp_nav_menu always falls back to a menu
- wp_get_nav_menu_items how to exclude sub level menu items?
- Add custom attributes to menu items without plugin
- Not able to get current menu ID
- Add class to active top level (grandparent) menu item
- How to get Menu Navigation Labels to output HTML
- custom menu not found
- Number of items in a menu
- wp_nav_menu doesn’t generate parent/ancestor classes
- How to add text before WordPress menu item href
- Why is ‘nav_menu_item_args’ filter’s $item argument empty?
- WordPress wp_nav_menu with a nav tag
- `start_el` depth argument in custom nav walker always evaluates to zero
- Benefits of using Nav Walker?
- Use walker for specific menu, or avoid use of walker
- Change where navigation bar links?
- Programmatically set current-menu-item using wp_nav_menu
- WordPress Split Menu
- has_children in custom nav_walker
- How to have custom menu Item CSS Classes for wp_page_menu() or wp_list_pages()
- Adding Custom “Current Menu Item” class to navigation?
- How to fix “Supplied nav_menu_item value missing property” after update to WordPress 5.0
- Check if menu id = $specific_id – then insert specific
- Change an li class name in a wordpress custom menu walker
- Separator for custom nav menu
- How do I add recent posts to the menu?
- Conditional secondary menus
- current-menu-item class is not added
- Automatically list top level menu item child pages
- Nav and logo loading each time causing menu to move JointsWP – Foundation 6
- Check if menu_item has children or has parent
- wp_page_menu not working right?
- Using _s theme, menu changes do not affect header menu
- How to get rid of the home link in nav menu?
- Is it possible to add a dynamic link in the main navigation in a child theme
- display menu as table layout
- Show children (sub-navigation) of active menu item only
- magic “MENU” button under Twenty Twelve theme
- Menu Arrow for Child Element
- Adding an external link to wordpress menu
- How to make wordpress nav menu use post custom meta data
- Add a counter beside menu item label
- add another html tag after li element in wp_nav_menu
- Twenty Fifteen: Change navigation menu behavior
- Odd spacing in Navigation Bar [closed]
- wp_list_pages Hierarchical Help
- How to avoid the and which added when custon menu widget is used
- Add pages content to startpage through custom menu
- How to add a menu that belongs to parent blog to all child-blogs?
- (Mobile) Hamburger menu disappeared from a page (only one)
- My menu doesn’t fit in the default screen in the mobile version
- How to change how WordPress renders navigation menu on Block Themes
- Problem with links once in portfolio item
- Top bar menus not showing on mobile
- Possible to append class to nav menu added to widget area?
- url_to_postid method in walker_nav navigation menu causing exceptionally high TTFB
- Add Different Class on Different Ul in twenty-twentyone theme
- Get Each Menu Nav Label of Menus in HTML tag
- Is it all right to put the whole tag into template_part file?
- Mobile menu displays submenus on top of parent. Need it to display right below on an own line
- wp_nav_menu container style args
- Misleading behaviour on Menu & Theme location
- How can I click the parent menu then redirect to a special URL?
- How do I display menu in header without loosing styles?
- Adding additional html to the end of the root level in a custom nav walker
- Change menu for mobile
- Navigation bar is on live site but nothing under menu so can’t add in a page
- Building a menu from a large number of pages?
- Show thumbnail to category items in wp_nav_menu(), how?
- How to select particular menu position in wordpress?
- Links in new menu don’t work
- Conditional Nav Menu Inside Nav Menu Across Multisite Sites
- Add dynamic content block to nav section generated by custom walker
- Mobile Menu Not Working
- Next/previous a-like single navigation
- How to output the menue structured for tabbed navigation?
- Replace Menu Item with Logged in username
- TwentyTwelve child theme: Incorrect footer menu
- Walker for menus
- WordPress Navigation
- Navigation list not correctly styled on pages with custom template (missing .current-menu-item)
- How was this menu system created?
- Display sub menus as separate lists
- how can i get the page_ID in nav li [closed]
- How do i add logo in wordpress studiopress (glam theme)?
- How to add a class directly on a unordered list element that is a primary navigation
- How do I programatically remove Menus?
- Displaying a Custom Avatar in WP Bootstrap Navwalker Menus in WordPress
- Is there a way to make it so that I don’t get a hamburger menu, but rather a desktop style nav, when resizing to a mobile size
- Give custom class names to WP nav sub-menu