Insert First Image into post (full-width)
This is the function I use, maybe there is a better way. $attachments = get_children( array( ‘numberposts’ => -1, ‘order’=> ‘ASC’, ‘post_mime_type’ => ‘image’, ‘post_parent’ => get_the_ID(), ‘post_type’ => ‘attachment’ )); $first_attachment = reset($attachments); //$last_attachment = end($attachments); or last image echo wp_get_attachment_image($first_attachment->ID, ‘full’); Additional wp_get_attachment_image parameters found here: http://codex.wordpress.org/Function_Reference/wp_get_attachment_image