
wordpress建站中,如何利用自身函数显示当前评论的作者名称,下面web建站小编给大家简单介绍一下comment_author函数的基本用法!
函数原型:
comment_author( int|WP_Comment $comment_id )
函数源码:
function comment_author( $comment_id = 0 ) {
$comment = get_comment( $comment_id );
$author = get_comment_author( $comment );
echo apply_filters( 'comment_author', $author, $comment->comment_ID );
}
调用方法:
<div><?php comment_author(); ?></div>
标签: comment_author, wordpress技巧, wordpress评论
上面是“wordpress技巧如何显示当前评论的作者名称”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_4602.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

Ctrl-World模型使用入口,厘米级轨迹精度、0.986的策略评估一致性及0.93的深度准确性
mysql语法中如何把null数据转换成0
Paywall Buster:一个专门用于绕过付费墙的在线免费工具集合
当贝AI智能助手,整合DeepSeek、豆包、通义等多款优质大模型