尝试以下操作:
<?php
$the_query = new WP_Query( \'showposts=1&cat=55\' );
if($the_query->have_posts()) :
while ($the_query -> have_posts()) : $the_query -> the_post();?>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail();?></a>
<?php endwhile;
endif;
/* Restore original Post Data */
wp_reset_postdata();?>
将cat=55替换为您想要的类别ID和/或将showposts=1替换为您想要显示的最新帖子数(如果您想要超过1)。
如果您希望缩略图的大小不同,可以使用以下选项之一(摘自http://codex.wordpress.org/Function_Reference/the_post_thumbnail):
the_post_thumbnail(); // without parameter -> \'post-thumbnail\'
the_post_thumbnail(\'thumbnail\'); // Thumbnail (default 150px x 150px max)
the_post_thumbnail(\'medium\'); // Medium resolution (default 300px x 300px max)
the_post_thumbnail(\'large\'); // Large resolution (default 640px x 640px max)
the_post_thumbnail(\'full\'); // Full resolution (original size uploaded)
the_post_thumbnail( array(100,100) ); // Other resolutions