<?php
$args = array(
'post_parent' => $post->ID,
'post_type' => 'attachment',
'post_mime_type' => 'image',
'orderby' => 'menu_order',
'order' => 'ASC',
'offset' => '1',
'numberposts' => 1
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
if(wp_attachment_is_image( $attachment->ID )) {
echo '<a href="'. wp_get_attachment_url($attachment->ID) . '" class="thumbnail">'. wp_get_attachment_image($attachment->ID) .'</a>';
break;
}
}
}
?>
Спасибо, Глен, за предоставленный способ найти ответ!