WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Thomas
    Member
    Posted 1 year 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!

    http://wordpress.org/extend/plugins/attachment-taxonomy-support/

  2. Thomas
    Member
    Posted 1 year 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?

    http://wordpress.pastebin.ca/2207116

  3. Ben Huson
    Member
    Plugin Author

    Posted 1 year 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

About this Topic