wordpress博客首页第一篇日志显示全文,剩下的都显示摘要的方法

admin 小知识1 字数 460阅读模式

wordpress博客首页第一篇日志显示全文,剩下的都显示摘要的方法

鲜活优惠码分享如何让首页第一篇日志显示全文,剩下的都显示摘要的方法。

内容输出部分改成以下代码

if(!$first){ $first = 1; $more = 1; the_content(); $more = 0; } else { the_excerpt(); //或者使用the_content(); }

------------------------
把<?php the_content('Read the rest of this entry &raquo;'); ?>

或者

<?php the_content; ?>

<?php the_excerpt; ?>


<?php
if(!$first){
$first = 1;
$more = 1;
the_content();
$more = 0;
}
else {
the_excerpt(); //或者使用the_content();
}
?>


写成这样就可以了。 godaddy 优惠码 godaddy 2012优惠码
以上是wordpress博客首页第一篇日志显示全文,剩下的都显示摘要的方法全文

 
admin
  • 本文由 admin 发表于 2012年3月24日 11:00:00
    • 时光的线条
      时光的线条 4

      学习了~

    评论已关闭!