Skip to main content
4 of 4
Add link to official documentation
fuxia
  • 107.1k
  • 38
  • 255
  • 459

These are the query parameters i use...works for me when i loop through the results

array(
    'post_parent' => $post->ID,
    'post_status' => 'inherit',
    'post_type'=> 'attachment',
    'post_mime_type' => 'image/jpeg,image/gif,image/jpg,image/png'                  
);

For more detail, please see official documentation for WP_Query's status parameters

Wok
  • 742
  • 2
  • 7
  • 16