使用根本不起作用的过滤器控制摘录长度

时间:2016-06-12 02:52:42

标签: wordpress

我试图使用过滤器修剪摘录长度:

function custom_excerpt_length( $length ) {
    return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

但它根本不起作用。我把它放在我的主题中的functions.php中,但它什么也没做,不是错误,没有。任何的想法?感谢。

0 个答案:

没有答案