Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $query = new WP_Query('category_name=foobar&post_status=publish&showposts=5');
- foreach($query->posts as $spost)
- {
- $children =& get_children('post_type=attachment&post_mime_type=image&post_parent='.$spost->ID);
- foreach($children as $child)
- {
- echo wp_get_attachment_thumb_url($child->ID);
- echo wp_get_attachment_url($child->ID);
- //etc...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement