Forums

[resolved] Request - Media Library ( Remove attachment w/o forced delete ) (5 posts)

  1. TOTM
    Member
    Posted 1 year ago #

    I have encountered several situations where I wanted to remove an attachment from a post but without a forced delete of the actual file.

    For example both changing or removing a featured image and/or editing a gallery are fairly common edits.

    When an image is shared among posts and it is removed from a single post it is deleted from the Media Library rather than just being removed as an attachment to a single post.

    This would be a practical option as both immediate and bulk actions in the Media library.

  2. spacechampion
    Member
    Posted 1 year ago #

    This plugin does it:
    http://shibashake.com/wordpress-theme/media-library-plus-plugin

    It allows you to attach and detach single attachments or in bulk to posts, pages, custom posts, and galleries.

    I don't know why it is not in the plugin directory, but I use it and have had no problem with it.

  3. TOTM
    Member
    Posted 1 year ago #

    @spacechannel - Theres a few things I would recommend improve with the plugin but mostly trivial.

    You're correct, though, the author and his theme/plugins are not registered in the directory here.

    I've tested that plugin with 3.0.1 and it's exactly the functionality that I was looking for.

    Thank you.

  4. spacechampion
    Member
    Posted 1 year ago #

    You are welcome. I agree some improvement could be made. Best to go over to shiba's site to suggest them.

  5. wlindley
    Member
    Posted 10 months ago #

    If you are looking to temporarily disable an attachment on a post or page, without deleting it or even "un-attaching" it, WordPress does actually support the post_status of "private" internally... although there is no user interface to set it.

    I wrote a tiny plugin which simply adds a check-box called "Attachment enabled" that sets the post_status to either "inherit" (the normal state) or "private".

    A "private" attachment will not be displayed by the [gallery] shortcode, nor by the AutoNav plugin; but WordPress does not (yet) prevent it from being viewed with a URL like http://www.example.com/?p=57 nor does it prevent you from downloading the actual attachment file directly.

    I hope this feature is moved into the WordPress core sometime, along with the ability for attachments to be "future postings," to have tags, taxonomies, and so on.

Topic Closed

This topic has been closed to new replies.

About this Topic