Tags for attachments

  1. Jenst

    I have waited years for the ability to add tags to attachments. It's still not implemented in WordPress.

    Now it's hard to find attachments when having a few hundred of them. With tags they would be easier to find.

    Also, it would make it possible to create image galleries for a specific tag on the front-end. It would also create a kind of relations between the attachments.

    Posted: 5 years ago #
  2. Rami Yushuvaev


    Since WordPress 3.5 you can do this using:

    register_taxonomy( 'media-category', 'attachment', $args );

    Posted: 5 years ago #
  3. Tusko Trush

    // apply tags to attachments
    function wpa_add_tags_to_attachments() {
    register_taxonomy_for_object_type( 'post_tag', 'attachment' );
    add_action( 'init' , 'wpa_add_tags_to_attachments' );

    Posted: 1 year ago #
  4. Thanx Tusko Trush for this code. Its helpful

    Posted: 1 year ago #
  5. I also think, it's a very helpful code. great!

    Posted: 1 year ago #

RSS feed for this topic


You must log in to post.

  • Rating

    2 Votes
  • Status

    Duplicate of another idea