wordpress自定义摘要截取字数的代码

wordpress自定义摘要截取字数的代码,第1张

wordpress="superseo">ss自定义摘要截取字数的代码

Wordpress自定义摘要截取字数代码,盆友一定要参考。


复制代码代码以下:
functionexcerpt($limit){
$excerpt=explode('',get_the_excerpt(),$limit);
if(count($excerpt)>=$limit){
array_pop($excerpt);
$excerpt=implode("",$excerpt).'...';
}else{
$excerpt=implode("",$excerpt);
}
$excerpt=preg_replace('`\[[^\]]*\]`','',$excerpt);
return$excerpt;
}

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/772631.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-03
下一篇 2022-05-03

发表评论

登录后才能评论

评论列表(0条)

保存