@deepbevel: You could do sth. like this:
$term_list = wp_get_post_terms(19, 'media_tag', array("fields" => "all"));
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?
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?
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!
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>' ) ?>
- The topic ‘Display all tags of an image’ is closed to new replies.