Yskin’s wp-CJK-excerpt插件。让wordpress首页文章只显示摘要。尤其值得一提的,是去除所有html标签显示(也可以通过修改代码保留标签)。
Yskin’s wp-CJK-excerpt为CJK的WordPress用户提供更好的摘要算法,以解决WordPress默认摘要算法只考虑西方语言的不足。
说明在上面了,主要介绍一下用法,不是“启用”就可以用的。
需要修改所用模板index.php页面中的
<?php the_content('Read the rest of this entry »');/*引号中也有可能是其它内容*/ ?>
这一行改为
<?php the_excerpt(); ?>
对于没有single.php页面的,还需要自建一个single.php文件,添加如下代码:
<?php if (is_single()) { ?>
<?php the_content('Read the rest of this entry »'); ?>
<?php } else { ?>
<?php the_excerpt(); ?>
<?php } ?>
这样就可以了。
不错啊,感谢楼主的无私奉献!!!