zuoridangnian 大佬有话说 :
wordpress开发主题 怎么自定义摘要字数啊?
我现在在functions.php文件里 加入这个
function my_excerpt_length($length){
return 10;
}
add_filter(‘excerpt_length’, ‘my_excerpt_length’);
但效果不好
fliu52 大佬有话说 :
这个我是不太了解的。有请大神给你做进一步的解答
老狼 大佬有话说 :
直接使用
<?php echo wp_trim_words( get_the_content(), 60, ‘…’ );?>