此代码显示3个最近的帖子,白色帖子缩略图等。当我手动使用“更多”标签打开文本时,它只显示文本到这个地方,但没有“阅读更多”。我应该编辑哪些参数?
<!-- LOOP START -->
<?php $the_query = new WP_Query( 'showposts=3&cat=4' ); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<!-- THIS DISPLAYS THE POST THUMBNAIL, The array allows the image to has a custom size but is always kept proportional -->
<div id="hotele"><a href="<?php the_permalink() ?>"> <?php the_post_thumbnail( array(349,349) );?></a>
<!-- THIS DISPLAYS THE POST TITLE AS A LINK TO THE MAIN POST -->
<div><h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2></div>
<!-- THIS DISPLAYS THE EXCERPT OF THE POST -->
<li><?php the_excerpt(); ?></li>
</div>
<?php endwhile;?>
<!-- LOOP FINNISH -->
答案 0 :(得分:1)
the_excerpt()
将显示40个字符,最后您可以显示更多链接以及永久链接到实际的单个帖子页面,例如<a href="<?php the_permalink()?>">Read More</a>