From first view this seems to be tough job, but actually even I having small skills of php could solve this problem just adding following code to my custom walker class:
if ( $depth == 1 ) { // remove this statement if depth check is not required
if (wp_get_nav_menu_object($item->title)) {// checking if item name matches to menu name
$item_output .= wp_nav_menu( array('menu' => $item->title, 'container_class' => 'mgmenu_tabs_panels', 'menu_class' => '', 'menu_id' => 'section'. $item->ID, 'echo' => 0 ));
}
}
as simple as that.
This script will check if any created menu name matches sub menu item name, and when they match script will add all items from that matching menu.
Basically this script allow you divide any large menu into many smaller ones.
Related Posts:
- What’s the easiest way to duplicate an entire navigation menu?
- How to make a plugin auto-add item to nav menu
- Popup Maker nav menu item not working
- Set the active Navigation Menu from a plugin
- Easiest way to add dropdown to a page
- How can I add a fixed vertical menu to my site? [closed]
- WordPress site hamburger menu toggle not working
- How to build a navigation menu for long-form texts like this one
- How can I create a navigation menu in the sidebar that can also act like a slider?
- Prevent primary navigational menu from expanding during page load (WordPress / Astra Theme)
- Add section (add_settings_section) to a custom page (add_submenu_page)
- How to call “page specific menu items” in template [closed]
- Custom wp_nav_menu output (displaying all child elements of top menu element in current branch)
- wp_nav_menu(); Outside WordPress installation
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- How do I make a wordpress plugin with menu item etc
- Creating WordPress Plugin solely for Admin panel with dash menu and submenus
- Creating a menu page in a Object Oriented developed plugin
- Multiple navigation menus to a location?
- Making menu link open in new tab?
- Include Max mega menu Plugin into theme
- How use %like% in sql statement wordpress
- Wondering what these multi-colored extra pages are?
- Menus, but not by theme location
- How to make a customize role and view a specific plugins base on that role?
- Creating a nav menu
- looking for navigation plugin (accordion) [closed]
- How to get the element ID from new menu list that added with add_filter()?
- Polylang : Interverting languages after development [closed]
- Delete mobile menu button [closed]
- html generated by theme exist but doesnt appear in browser
- Changing page URL and connect newsletter to MailChip
- Dynamic admin submenu
- Center and hide overflow of WP toolbar custom links
- How to remove admin main menu name repetition
- Custom Permalink Plugin and Current Page/Ancestor in Menus
- wp-custom-menu filter removes the current_page_item class
- add_action does not call the function
- How to use my menu PHP code as sidebar?
- Creating Featured Content Boxes
- Hide a Menu Item on Login
- How to get menu location in wp_update_nav_menu hook
- PHP script from functions php is loaded via admin-ajax to div…and the result is 0, not the desired content
- Ambrosite Next/Previous Post Link Plus or WP next_post_link to cycle through top level category
- Progmatically adding menu links to the default (Top) or Footer menu
- $pages = get_pages(‘child_of=’.$post->ID); Why arguments are concatenated?
- Changing location of “About me” section
- WordPress Custom Menu Admin helper plugin
- Hook on creating a menu entry?
- Dropdown menu on click change
- navigation among single posts
- How do i specify a url to which to redirect the user after he logs out from facebook?
- Adding a pagenavi to function for displaying bookmarks
- I cannot include a file in my plugin settings page
- Button and Countdown overlapping mobile menu
- Navbar affect loading all products
- Slideout submenu in mobile
- Display posts by alphabetical order
- Mobile Menu and Mobile Sidebar missing
- WP Forms not displaying,becomming an fatal error
- WordPress Dashboard add user password not working, etc
- Add custom WordPress admin page with pretty url via code
- I need to show side menu in wordpress
- Scroll to ID broken in main menu
- Create survey that redirects to sidebar menu customized to answers
- Pagination (including title of each page) in a post for a long posts
- Circular Menu to show on pages
- Warning: sprintf(): Too few arguments in nav-menu-template.php
- Page Contents showing in Footer Area
- How to disable users to view Other pages
- Ubermenu 3 Nav Bar Customization
- Sub Categories in drop down menu
- WordPress menu and plugin installation problem
- How to assign plugin to top level menu?
- Adding icons next to categories in wp_nav_menu
- Creating a page that does not show up in the frontend navigation bar
- add_media_page function not creating submenu
- How can I pass value to function in add_menu_page?
- Automatically add child pages to menu
- Drop down menu location select widget
- How to add plugin activity in the menus?
- How change menu for each user in plugin?
- Menu items’ links are not working properly and added images
- how to change/remove/hide menu under installed plugins
- Category archive in menu
- Redirect url in plugin to somewhere else?
- How to activate/deactivate menu tab and keep the same id?
- How can I add different menus (different style menu) on each page?
- Make a Custom template for a specific category in wordpress
- Call to a member function get_page_permastruct() on null
- Automatically put a menu on every post
- How to validate password length in wordpress
- Why plugin’s icon for the menu not found?
- Plugin: Custom menu item problem
- Is it possible to know which menus are owned by a plugin?
- How to make horizontal scrolling menu [closed]
- My wp_update_nav_menu action is firing twice
- How to check if the Menubar contains no items?
- How does one add numbers to an admin menu?
- Adding fontAwesome to Primary Menu returns after saving the menu