wordpress默认的是全文显示一篇博文,如何分页显示呢,自己纠结了好几天,终于找到方法来,请看下面
大家编辑主题文件夹下的index.php
原主题的代码是::
<?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry »', 'kubrick')); ?>
或者是相似的
然后把上述代码更换为:
<?php if(is_category() || is_archive() || is_home() ) {
the_excerpt();
} else {
the_content('Read the rest of this entry »');
} ?>
<div><div><?php comments_popup_link('没有评论', '1 评论', '% 评论'); ?> 直到现在 | <a href="<?php the_permalink() ?>">阅读全文 »</a></div></div>
就能够实现分页显示了!
还有一种方式,就是插入<!--more-->标签,这个在编辑框工具栏中就有,只要在文章中要插入标签的位置,按一下这个工具就可以了,方便使用!不过每一片文章都要插入!!
文章评论
此法可用,鉴定完毕!!