最好的使用方法是什么<?php the_post_thumbnail();?>
在我的循环中BUT 仅在第一篇文章上显示缩略图?意思是,只有循环中的第一个帖子才会显示其图像?
Here is an example of a loop that shows the image for ALL posts:
<!-- Start the Loop. -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- Display the Title as a link to the Post\'s permalink. -->
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<!-- Display the posts Image thumbnail for the post -->
<?php the_post_thumbnail();?>
<!-- Display the date and a link to other posts by this posts author. -->
<small><?php the_time(\'F jS, Y\') ?> by <?php the_author_posts_link() ?></small>
<!-- Display the Post\'s Content in a div box. -->
<div class="entry">
<?php the_content(); ?>
</div>
谢谢大家!