Attachment Taxonomy Support
[resolved] How to retrieve attachment tags as text? (3 posts)

  1. Thomas
    Posted 3 years ago #

    This looks like a welcome contribution to increase wp's media management flexibility!
    I wish I could retrieve the tags, though. I need to output them as a list on the page on a per attachment basis.

    I've tried wp_get_attachment_metadata and get_terms` but with my quasi non-existent php knowledge I can't seem to echo the tags.

    The only thing that gets echoed is Array

    Any help is greatly appreciated!


  2. Thomas
    Posted 3 years ago #

    Following-up on my previous post: as a temporary workaround I'm using the custom fields associated with attachments (that may be a feature of the file-gallery plugin and not wp's own, actually).

    Below is a working snippet. I just hate to have to resolve to using those custom fields. Does anyone know how to achieve the same result with the tags created by Attachment Taxonomy Support instead?


  3. Ben Huson
    Plugin Author

    Posted 3 years ago #

    If you wanted to retrieve tags or other taxonomies associated to a media item, you would need to use wp_get_object_terms().

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Attachment Taxonomy Support
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic