Prueba así CorpseOfSteel:
Código PHP:
Ver original<?php query_posts('cat=1'); ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php
'post_type' => 'attachment',
'post_mime_type' => 'image',
'numberposts' => 1,
'order' => 'menu_item',
'post_parent' => get_the_ID()
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
$mini = wp_get_attachment_image_src( $attachment->ID, 'thumbnail' );
$grande = wp_get_attachment_image_src( $attachment->ID, 'full' );
$miniatura= '<img src="'.$mini[0].'" width="'.$mini[1].'" height="'.$mini[2].'" alt="'.get_the_title().'" title="'.get_the_title().'" />' ."\n";
}
}
?>
<a href="<?php echo $grande[0] ?>"><?php echo $miniatura ?></a>
<?php endwhile; endif; ?>