函数原型:
comment_author_IP( int|WP_Comment $comment_id ) //$comment_id,WP_Comment或要打印作者IP地址的评论的ID。默认当前评论。
函数源码:
function comment_author_IP( $comment_id = 0 ) {
echo esc_html( get_comment_author_IP( $comment_id ) );
}
调用方法:
评论作者ip地址: <?php comment_author_IP(); ?>
php语法对index.php首页进行判断(根据需要显示不同页面)
wordpress新建页面中页面属性里没有“模板”选项解决方法
上面是“WordPress技巧如何显示评论作者ip地址”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_4640.html
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

利用html注释写法做IE兼容<!--[if IE]>
ChatGPT Pro:OpenAI推出的高端付费产品,包含o1模型无限使用权益
Internet Archive Wayback Machine Link Fixer插件下载入口 











