Get images / media attached to a page by page ID
$all_the_images = get_attached_media( ‘image’, 31 ); should return any image attachments for a page the ID of 31 if that page has child images. Meaning, there are images that were uploaded and actually attached to that page, not just upload and inserted into that page. When you use the media uploader (to upload images), from … Read more