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!

6 Answers
6

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');

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *