WordPress.org

Support

Support » How-To and Troubleshooting » Get attachments from posts from given category

Get attachments from posts from given category

  • I need to get 5 attachments (images) from 5 newest posts from given category (‘foobar’) in WordPress. At the moment I can do it by calling two functions separately (WP_Query and get_children):

    http://pastebin.com/29kYhg1P

    But I’m looking for simpler solution (maybe with use of wpdb?) Is there any?

  • The topic ‘Get attachments from posts from given category’ is closed to new replies.