I should note than the above example was trying to extract the IDs of the tags so I could then get the name/slug of each, I’ve also tried:
class="'.the_terms( $post->ID, 'attachment', '', ' ' );.'"
and this doesn’t work either
class="'.the_terms($post_item->ID,'taxonomy=media-tags','',' ','').'"
ok, I need to stop copying/paste!
"'.the_terms($post_item->ID,'media-tags','',' ','').'"
is working a lot closer to what I need. Now to get rid of the linkage!
I ended up using
http://codex.ww.wp.xz.cn/Function_Reference/wp_get_object_terms
and looping through to get the exact output I wanted.
@jsrobinson,
Thanks for writing. So I see you have the solution to your own question.
Correct, the Media-Tags plugin simply creates a custom taxonomy. So you can use the WordPress functions as needed.
As part of the plugin there are also some template functions you can use. For example there is a function ‘the_mediatags()’ which is similar to the WordPress ‘the_cateogies()’ for the post categories taxonomy and ‘the_tags()’ for the post tags taxonomy. Check out the plugin file mediatags_template_functions.php
Let me know if you need any more help.
thank you for the pointer for the helper functions, definitely been spending some time in there today 🙂