Support » Plugin: Unattach and Re-attach Media Attachments » [Plugin: Unattach and Re-attach Media Attachments] bulk detach with jQuery

  • Resolved James Revillini


    If you’re a geek, you may find this useful. So let’s say you want to detach all attachments from a certain page or post. You can run this script in the JS console of any decent browser to detach all who belong to a certain page/post title:

    jQuery("td:contains('Page Title Here') a:contains(Unattach)").each(function(){jQuery.get(this.href)})

    Use with caution. You could accidentally detach all your media items if you do this incorrectly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi, simple and useful plugin, anyway a “bulk detach” would be great!

    Yes, it would be nice, if bulk-unattach was built right in. The native WP functionality allows you to check multiple files, then use the attach link on one file to attach all checked files. This does not work using the new Unattach link created by this plugin. Add that feature and it gets a full 5 stars from me (currently I only gave it 4)!

    yup, that may be great too! 🙂

    Plugin Author davidnde


    Hi guys.

    Sorry I didn’t reply for a long time. Didn’t notice that there is quite a little interest in this plugin and WordPress didn’t notify me about these posts 🙁 But I am very happy this tiny plugin is useful for some people. So I immediately took action 🙂
    The bulk feature is a great idea. I implemented both, unattach as well as re-attach as bulk features. Just use them similar as if you would use the build in bulk attach.


    Wow. Awesome! Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Unattach and Re-attach Media Attachments] bulk detach with jQuery’ is closed to new replies.