Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $imgargs = array('post_type' => 'attachment','post_mime_type' => 'image','numberposts' => -1,'order' => 'ASC','post_status' => null,'post_parent' => $post->ID );
- $attachments = get_posts($imgargs);
- if ($attachments) {
- foreach ($attachments as $attachment) { $img = wp_get_attachment_thumb_url( $attachment->ID );
- break; }
- } ?>
- <img src="<? echo $img ?>" alt="" />
Add Comment
Please, Sign In to add comment