iNove的作者mg12的博客上使用的是一种伸缩型的显示,不是很喜欢,想修改成显示文章摘要的样式,在网上搜索后终于找到了方法。
利用函数的方法,使主页和分类目录显示摘要
1. 打开iNove中的index.php文件,找到
<?php the_content(__(‘Read more…’, ‘inove’)); ?>
修改为:
<?php if (is_single() or is_page()) { the_content(__(‘Read more…’, ‘inove’)); } else { the_excerpt(); } ?>
2.找到iNove中archive.php文件,同样找到
<?php the_content(__(‘Read more…’, ‘inove’)); ?>
替换为:
<?php the_excerpt(__(‘Read more…’, ‘inove’)); ?>
这里只是将输出函数the_content修改为the_excerpt。