文章长了,wordppress首页就显得不够清爽和整齐。早先研究了两个修改代码的方法。一是手动每篇添加,使用wordpress提供的more标签,二是修改主题。找到wp-content/themes下你使用的模板目录,查找目录中的文件,如果有home.php则修改home.php,没有的话就修改index.php,找到<?php the_content(); ?>这一行,将其修改为以下代码:
<?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(‘No Comments’, ‘1 C …… 阅读全文