我加入以下代码到我的functions.php脚本我的主题范围内:WordPress的 - 自定义the_excerpt()不工作
function custom_excerpt_length($length) {
return 15;
}
add_filter('excerpt_length', 'custom_excerpt_length', 999);
function new_excerpt_more($more) {
return '...';
}
add_filter('excerpt_more', 'new_excerpt_more');
的建议此页上:http://codex.wordpress.org/Template_Tags/the_excerpt
但的长度摘录仍然是默认的55个字,最后的字符串仍然是[...]
而不是...
。
的WordPress版本3.4.1
我使用显示摘录的代码很简单:
the_excerpt();
有没有人对如何解决它,这样任何想法添加到我的功能.php工作?
工程与WordPress 3.1了。谢谢! – deathlock 2012-09-25 16:23:40