I’m looking for a plugin that will let a user tag images attached to a post. My goal is to have a class added to the tag so that I can (hopefully) then create different jQuery image rotators within that post, each using images with a different tag/class.
Edit with more detail:
I found a plugin called Media Tags, but I don’t think this (directly) accomplishes what I want. It adds a taxonomy to media items, and the media items can then be displayed on the site (through a template tag or a shortcode) according to their ‘media tag’. My ultimate goal is to make it possible for the person updating the site (a client with no previous knowledge of WordPress) to easily insert several images into a post, ‘tag’ them, and have those images displayed in separate jQuery image rotators within the post, according to the tag assigned to them. My initial thought is that the best way to do this is make it easy and intuitive for a class to be added to the tags, but I’m open to other suggestions.
I realize classes can be added to an already attached image by accessing the Edit Image > Advanced Settings
screen, but I’m not sure how intuitive that will be, and I would of course prefer that the class/tag be chosen from a list, to minimize mistakes.
register_taxonomy_for_object_type('post_tag', 'attachment');
should do the trick. I think you could even do this from your themes functions.php .Edit: ok, try this (save as attachmenttags/attachmenttags.php in your plugins folder and make sure WP can read it, then activate in plugin manager):
BTW: This also creates the post tags field in the add/edit image popup when editing the actual post/page.
Edited again, should now also inject the classes whenever you use get_the_post_thumbnail() in your theme.
I recommend you use Attachments plugin. This adds a small meta box to the bottom of a post, where the user can easily add images from the library or upload new images. If you use add_image_size you can add support for any sizes your themes needs. They can also re-order the images by drag and drop and add metadata such as caption and alt text.
You can integrate this into your theme really easily, images will always be the right size and you can then add something like jQuery cycle to add rotating images on each post.