How To Add MIME Type Dependent Listings To ‘Media Tags’ Plugin And Its Shortcodes ?

This tutorial is about extending shortcode functionality of popular Media Tags plugin. Tag listings available by [media-tags media_tags="my-tag"] are intended only for images and other attachments produce invalid list items. This is where Multi-Media-Tags comes to the rescue. The attachments MIME type (like image/pngvideo/ogg or application/json) decides how to  appropriately format the attachment.

In case if no appropriate actions can be taken then Multi-Media-Tags simply provides your a download link. Other available options are:

  1. an HTML5 audio player for audio/*
  2. an image tag for image/*

Remember; Media Tags plugin is required for using Multi-Media-Tags plugin.

Installation & Usage:

Install and activate Multi Media Tags plugin. After activation you can start using its shortcode. Options are same as for media-tags shortcode. For Example:

  • [multi-media-tags media_tags="mytag"]
  • [multi-media-tags media_tags="foo,bar,neither-nor" orderby="title" order="ASC"]

Presently images get <img>-tag and audio gets an <audio>-tag and all other attachments are represented as a download link

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.