/ Published in: PHP

Gets a post or page's attached images and outputs them.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
'post_type' => 'attachment', 'post_mime_type' => 'image', 'post_parent' => $post->ID ); $images = get_posts( $args ); foreach($images as $image): echo wp_get_attachment_image($image->ID, 'medium'); endforeach;
URL: http://stackoverflow.com/questions/1815158/show-attached-image-to-post-on-wordpress
Comments
