Change Media Attachment Parent: Wordpress Plugin

Change Attachment Parent allows you to edit the parent value of anything in the media library.

This becomes useful if you have uploaded images you’d like to place in a post’s gallery that are not currently children of that post.

I’ve also found that sometimes you add a new post with photos and they are not added to the gallery because you hadn’t saved the post when you uploaded them. This allows you to associate those photos with the post.

The interface isn’t that user friendly, you must enter the post ID, and I’d appreciate feedback on how to improve this.

Installation

1. Extract change-post-attachment.zip and place change-post-attachment.php `/wp-content/plugins/` directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress

Download

Download the plugin from the wordpress plugins page.

Donate


8 Responses

  1. Mike Says:

    Hey, I tried out your plugin, but it doesn’t seem to work.

    I have tried changing the parent-attachment ID of an image I have attached to page ID 508 to ID 11 (which exists) .. and when go to update it, the image still shows up as being attached to post ID 508. I have tried this for a number of different attachments and different post IDs and it doesn’t seem to work.

    Using Wordpress 2.8.3.

    Any help would be much appreciated.

    Thanks,
    // mike

  2. laqrhead Says:

    @Mike Thanks for pointing that out. I have no idea how this happened but the update portion of the plugin somehow got removed in the version I posted to the Wordpress plugin gallery. I’ve updated it to version 0.3 and it should all be good now.

  3. Mike Says:

    Works perfectly!
    Awesome!
    It’s one of the 3 top plugins I’m using in particular with the Media Library, I think I am going to write a post on my site about it!

    Cheers!
    // mike

  4. laqrhead Says:

    I’m glad it’s working for you now! I’d like to make it a bit easier to use, but the site it was designed for has thousands of posts, which makes it difficult to do something like a dropdown box. Any suggestions for improvement are welcome.

  5. Make it Blason : Wiesel.lu Says:

    [...] liebe Mikro-Plugins! Z.B. Change Attachment Parent von Joel Sholdice, es hat nur 30 Zeilen Code, davon gehören 8 zum Header und zwei sind [...]

  6. hevangel Says:

    Thanks for the plug-in. It solved my problem of how to add and delete existing picture from a gallery.

  7. William Lindley Says:

    Wordpress 2.9 includes the ability to locate and attach media which are currently un-attached; but it does not include the ability to change the parent of an already-attached file. THANK YOU for this!

    You might look into using the “locate post or page” logic that WP 2.9 uses, in addition to being able to specify an ID directly.

  8. matt Says:

    Great plugin. You know what would be great is if you could do the edit from the Library list instead of having to click into every attachment. That would make bulk changes much easier. Even without this it’s a big help, thanks!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.