I had to do this too, but didn’t find a quick and easy way. Since jQuery is available in the wp admin, I used that to select all the delete links and trigger the click event on them:
jQuery('#menu-to-edit')
.find('.submitdelete')
.trigger('click');
Related Posts:
- Retrieving a list of menu items in an array
- Add Javascript to WordPress Menu
- Add custom menu item using wp_nav_menu_items filter
- Custom Post Types posts as submenus in Nav Menu
- Filter out built-in wp_nav_menu classes but keep custom class
- How to get a different mobile menu than desktop menu in the twentytwelve child theme
- Menu is invisible in admin panel but it’s visible in front-end [closed]
- replace current_page_item class in menu
- Adding attributes to link in wp_nav_menu using custom Walker function
- How to add current, parent, and ancestor menu item IDs to body_class()?
- How to manually add an item to a submenu in a menu generated by wp_nav_menu?
- Walker_Nav_Menu: put custom code between a particular
- Remove navigation from header in custom page template
- How to create a custom menu item
- How to specify or extend the CSS-class of a menu item?
- Change image based on menu item id
- Add Bootstrap dropdown class to a nav menu
- WordPress Add javascript:void(0); to menu link item?
- Search box as a menu item in the nav menu output by wp_nav_menu?
- How to change Twenty Seventeen theme’s navigation bar location?
- Making WordPress’ page and menus visible only for logged in users, checking session variables
- How can I put two menus in the same div?
- Add static item to wp_nav_menu
- Indirect modification of overloaded property WP_Post::$classes has no effect
- WordPress – site with 2 stylesheets and more…
- Add nav menu CSS class to body
- Menu Custom link – using relative link when WP is in a subdirectory
- How to add a CSS class to the tooltip on a navigation menu?
- Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?
- WooCommerce dynamic menus
- Hide menu item based on user’s custom capability
- Auto add pages to primary menu with functions.php
- Add id to menu items in wp_nav_menu
- How to get the name of the parent menu if the current page is an archive page in a custom menu
- vertical menu bar
- Add dynamic Sitemap to footer
- How to add fixed position in menu class for Twenty Twelve theme?
- How do I separate link levels in a custom menu walker?
- Possible Menu Hack?
- how can i add css class on current page in wordpress wp_nav_menu
- How to rewrite the output of wordpress nav menu?
- Return Page/Post ID’s of Child WP_Nav_Menu items
- Allow users with Editor role to edit menus (without a plugin)
- Add custom links like functionality
- I need my dropdown sub-sub-menu box to show sub-menu title above
- Custom Links menu items include in Search Results
- When clicking on menu item not going to specific page
- Menu items suddenly are displayed all over the page [closed]
- Custom navigation structure with walker class
- Allowing HTML in Menu Descriptions
- How to add class to parent a tag with a sub menu
- CSS Classes (optional) on menu is not showing
- Listing Child Pages in a Certain Order?
- Why is only the first operation run in my loop – except for on the last repeat? [closed]
- Move Sticky Nav Menu Below WordPress Tool bar when tool bar enabled
- Prevent menu from loading in a page template [duplicate]
- WordPress + Bootstrap [closed]
- How to hide a menu from public, but share content with a private link [closed]
- Add custom link on the fly to nav menu
- WordPress menu>Custom Link: removing my link formatting and adding %20
- URL links consistent with menus?
- Strange menu behaviour wordpress admin [duplicate]
- Wp_list_pages not showing children with custom page template
- How to check if current page is a parent item or child item in a given menu
- changing the labels inside appearance -> menus for some for the fields
- Lost admin “manage_link” capability WordPress. No “Links” menu item in admin menu
- Buggy wp_nav_menu?
- dropdown menu, with walker
- Add function to custom menu
- if role is logged in then do something
- WP Menu Rollover Nav Item and Effect DIV Elsewhere
- Custom menu with additional logic for display
- Menu item that hides when you click the previous submenu
- Putting footer links into different columns
- How to create a mobile menu full screen overlay using Understraps Bootstrap 4 theme
- adding drop down menu item to existing menu
- wordpress walker add class to submenu a href
- Display searchform in the menu
- How to Hide/Remove Pages section in Menus (Dashboard)
- Unable to remove page from primary menu
- Show navigation header menu by post and categery
- wp-nav menu with custom walker , how to remove a tag if it has any submenu
- How to add a toggle on the left side of my page?
- How to add buddypress sub-menu items to other menus
- Custom location for menu
- Always show wordpress submenu on responsive header menu
- add custom entries to menu options
- Showing a link with Javascript based on log-in status
- Placing generated list into drop-down on custom menu
- Building Menus with the latest posts included
- Cannot control wp_nav_menu properly
- How to add drop down sub menu from database fields in the particular menu slug
- wordpress superfish dropdown menu
- Drop down menus css in custom menus
- Creating a custom menu
- How to change the markup created by menu item only on chosen items?
- How to disable permalink of a particular menu item?
- One item on menu is not clickable when it should be
- Critical Error when editing menu
- I need to change the hyperlink attached to the logo on the mobile menu