These are the query parameters i use…works for me when i loop through the results
1 2 3 4 5 6 | array( 'post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type'=> 'attachment', 'post_mime_type' => 'image/jpeg,image/gif,image/jpg,image/png' ); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.