以下代碼可以實現,自定義wordpress文章摘要顯示的字數長度,數值為字符號,漢字占兩個字符。

 
function new_excerpt_length($length) {
return 100;
}
add_filter('excerpt_length', 'new_excerpt_length');