Support » Plugins and Hacks » Display all tags of an image

Display all tags of an image

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Philipp Speck


    where 19 is the $post_id

    thanks, does it need a post id?

    I’d better review how the plugin works, haven’t tried it yet but I intend to.

    I was using something similar but couldn’t get dynamic output in the templats, had to use get_posts with tag conditionals. Everytime I wanted to output a new tag, I had to add it’s tag as a condition in the template. Not so good.

    maybe this plugin has a way?

    Plugin Author Philipp Speck


    You can do all those things which you can do with normal posts and their assigned tags, too. Technically they are eaqually.

    Yes, but there’s something I’m missing in my understanding of dynamic tags and category links, as related to a plugin like this.

    the_category and the_tags get all posts in the category/tag of the current post, or current achive, without specifying post id or the category.

    the goal is for a user to create a media category, then have attachments in that cateogory appear in an acrchive page list, without adding code for each new category or tag

    is this not possible with media tags?

    Plugin Author Philipp Speck


    If you want to show up all tags assigned to an image replace line 105 in my plugin with:

    $tags = get_the_term_list( $post->ID, 'media_tag', '', ', ', '' );
    $output .= '<a title="'.get_the_title().'" href="'.$url.'">'.$image.'</a>'.$tags."\n";

    This is just an idea how to get what you want!

    Plugin Author Philipp Speck


    Without changing my plugin (WordPress Media Tags 1.5) you can always retrieve the tags on the attachment page (image.php) by adding the following in you template:

    <?php print get_the_term_list( $post->ID, 'media_tag', '<p>Tags: ', ', ', '</p>' ) ?>

    thank you, anxious to try.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Display all tags of an image’ is closed to new replies.