WordPress摘要函数the_excerpt()默认显示字数可以通下以下方法修改:
function custom_excerpt_length( $length ) {
return 200;//200改成你想要显示的字数
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
WORDPRESS插件, WORDPRESS建站技巧分享
WordPress摘要函数the_excerpt()默认显示字数可以通下以下方法修改:
function custom_excerpt_length( $length ) {
return 200;//200改成你想要显示的字数
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );