3

I've done some searches but maybe I'm searching on the wrong terms. Does anyone know if there's a way to bulk-delete menu items in the new Appearance > Menus system? This is mostly to clean up localhost installations, so I'm totally open to plugins if anyone knows of one. I'd be thrilled if I could delete a Page and have all its sub pages (the ones I set as its sub pages via the Menu, not necessarily its real Child pages) also disappear from the menu, for instance.

Thanks for any help!

3

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');
  • This still works great, exactly as written! #menu-to-edit does not need to be edited. Thank you. – here Sep 28 at 0:57
1

There isn't a way to do a bulk delete. Instead, you should just create a new menu with your updated items.

The menu system is meant to be an easy-to-use, configure-once, drag-and-drop interface. There's no bulk delete because, really, very few people would ever need it and such a feature would likely clutter the interface.

  • Thanks, great tip! The times I've tried to bulk-delete are usually caused by importing "all content" which includes menus and duplicates all menu content. I've learned since to only import posts/pages, so haven't run into this as often. But this solution is perfect for those times when I have to import-all. Thanks again! – Michelle Jun 19 '12 at 17:51
1

Though I've looked, I have never figured out a way to bulk-delete child pages that were set by hand in the new Menu system. But, I have figured out how to auto-add child page via one of these two plugins:

If the child pages are auto-added via one of these plugins, I believe they call all be deleted simply by removing the parent page item or disabling the auto-add pages.

Hope this helps someone else who's struggling with managing large numbers of menu items (especially after the import process duplicates all of them!).

  • Answering and accepting your own answer is not the way to deal with unwanted downvotes. Even if no one left a comment as to why they were downvoting, it's meant to be a signal to you that something about your question is unclear. Considering the age of the question, you should have updated it with additional research, or a use case example, or offered a bounty for answering. – EAMann Jun 19 '12 at 17:50
0

being I was searching for the answer to the same question and this is the first link in search results I decided to post my solution here.

There is a plugin called "Quick remove menu item" that will help with deleting menu items faster. It hasn't been updated in 2 years but it still works with the latest version of wordpress.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.