Plugin Directory

Media Tags

Author: Paul Menard

Adds an input to the media upload and management screens. This input field can be used to "tag" a media file. Works with images, documents or anything.

The Media-Tags plugin 2.0 has been completely rewritten to use to WordPress Taxonomy system for storing related media-tag information. As a benefit to this rewrite the user now has a new Media Tags management interface located under the Media section. Via this Media Tags management interface users can better manage the media tags used on the site. Deleting, renaming and adding new media tags is now quite simple. The Media Tags for the attachment are still display both under Media and the media popup on the editor screen as before.

Because the media tags plugin now uses the WordPress Taxonomy system you can now access attachments via the new permalink '/media-tags/'. This is very powerful and one of the most requested features since the plugins initial release.

Also included as part of the plugin rewrite are some handy template tags to use via your theme. Below are a list of the template functions available. These are located in the plugin file mediatagstemplatefunctions.php. All these functions should seem very familiar since they were modeled after the built-in WordPress tags template functions.

  • ismediatag() - Tests is we are displaying a media-tags archive. Much like iscategory() function
  • inmediatag() - Tests is an attachment post marked in a certain mediatagid.
  • get_mediatags()
  • listmediatags() - Very handy for listing your media tags like listtags() in the sidebar.php
  • getmediataglink() - Given a mediatag_id this functon will return a link href value.
  • themediatags() - Very much like the post-level thetags() to display a comma separated list of tags for a given post item. Used then displaying media tags archives.
  • singlemediatagtitle() - Get the Title of the Archive.

Speaking of template tags you can now have even more control over the display of media tags archives. Much like the WordPress category template hierarchy you can now define a template file as part of your theme names 'mediatag.php' This is a special archive file tha can be used to display your loop of items. Alternately, you can also used ID specific template files like 'mediatag-25.php'. This is the same basic logic for category specific template file. It lets you use a special template file to display that specific media tag ID group. If the 'mediatag.php' template file is not provided then the default hierarchy or template files will be used starting with archive.php. Please not the template file when used will display attachments not the parent post. In WordPress all uploaded media is part of a parent/child association. Unlike the normal post related template the media tag template display the actual media files.

Just want to display attachments in a post or page? Use the new media tags shortcodes.

Plugin Homepage

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus (1 reporting)

100%
100,1,1
100,1,1
100,1,1

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(5 ratings)