Viewing 3 replies - 1 through 3 (of 3 total)
  • i am facing the same kind of issue. is there anyone out there who might know? ??

    Thread Starter deepbevel

    (@deepbevel)

    for me, most of the answer was in a plugin called media categories. Attachments don’t have categories by default, so the plugin adds the category taxonomy to media attachments.

    This idea was confusing for me, why can an attachment have an associated post id, but not a post category, or post meta?

    I only wanted to show the author of the attachment with the image.
    But first, there has to be a post, so there can be a way to output an author..
    As such, I had to use media categories in a way where I first get the posts and meta, then pull the attachments from those posts, and output attachments with the associated post meta.

    Thread Starter deepbevel

    (@deepbevel)

    As such, I had to use media categories in a way where I first get the posts and meta, then pull the attachments from those posts, and output attachments with the associated post meta.

    that actually is default wp behavior, and nothing to do with media categories.
    However, the ability to filter attachments per post by category, is what the plugin added that allowed me to acheive my goal.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘get_attachments by category’ is closed to new replies.