Is there a WordPress conditional that I can use to check for gallery images/media in a post?
I do not want to check if the shortcode exist in a post.
Attached is a screenshot of what I want to check for and if is images I want to output them to the page.
No Need for SQL queries in the template.
Then call the function like this (300 is the post ID):
wpse_72594_get_attachments(300)
, grabs all attachmentswpse_72594_get_attachments(300, 'image' )
, only imageswpse_72594_get_attachments(300, 'application/pdf' )
, only pdf files