截取方法:在主题 functions.php 文件加入
function custom_excerpt_length( $length ) { return 200; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
200为字数。输出为无HTML格式文字。
截取方法:在主题 functions.php 文件加入
function custom_excerpt_length( $length ) { return 200; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
200为字数。输出为无HTML格式文字。