WordPress如何自字义摘要显示的字数长度
以下代码可以实现,自定义wordpress文章摘要显示的字数长度,数值为字符号,汉字占两个字符。
function new_excerpt_length($length) {
return 120;
}
add_filter(‘excerpt_length’, ‘new_excerpt_length’);

更新时间:2025-12-07 21:12:33
上一篇:pbootcms多个多图(pbootcms留言板取消验证码)
以下代码可以实现,自定义wordpress文章摘要显示的字数长度,数值为字符号,汉字占两个字符。
function new_excerpt_length($length) {
return 120;
}
add_filter(‘excerpt_length’, ‘new_excerpt_length’);

更新时间:2025-12-07 21:12:33
上一篇:pbootcms多个多图(pbootcms留言板取消验证码)