is possible to get images added to a post programmatically? I am working on custom template (my first) and I need to display Images added to a post in specific way.(first image as title image and the rest of imgs only render into hidden img tags (will be visible through lightbox slideshow).
So is there any function like get_post_attachments('type'=>'image')
whose output I would be able to iterate over a loop?
Thanks for your help
You can use
get_posts()
(Codex ref for getting Post attachments).This gets all the images attached to a post :
Have a âlook at wp_get_attachment_image()â as well as the related functions, it’ll get you started.