各大平台应用了 评论显示地区显示国家,显示浏览器,显示手机或电脑 如:抖音 微博 快手….
![图片[1]-子比主题配置评论显示所在IP地区和使用设备(修复版)-梦都歌-精品资源社区,梦都歌资源网](https://www.mduge.com/wp-content/uploads/2024/08/1607f13b0ef98d4d-147x300-1.jpg)
今天教大家如何修改 我们的子比主题显示评论地区
代码已经为大家修改好了 只需要上传即可调用,废话不多说 直接上教程!
1.先下载我们的代码包
例如,使用的主题是 zibll ,则RAR包上传至 wp-content/themes/zibll/ 目录下(然后网站根目录也复制一份show-useragent文件)
2.替换代码 非常简单 不会联系站长 不免费 不白嫖 低情商别来
网上流行的基本都有问题,上传后前台评论错误,后台显示乱码,本站的已经完全修复,可查看本站下方评论,把本压缩包上传到主题的根目录,注意不是WordPress根目录加入function.php在 php 作用域内,添加两行代码:include("show-useragent/show-useragent.php"); // 显示访客信息include("show-useragent/ip2c-text.php"); // IP归属地和运营商查询功能/wp-content/themes/zibll/inc/functions/zib-comments-list.php 51行的 return '<name class="flex ac flex1">替换代码$ip = convertip(get_comment_author_ip());return '<name class="flex ac flex1">' . $user_name . $badge .'<span class="badg badge badg-sm flex0 ml3">'.$ip.'</span>'.'</name>';然后 搜索 $time_html 在第一个 //时间 直接替换 代码$diqu = CID_get_comment_browser();$diqu .= CID_print_comment_flag();$time_html = '<span class="comt-author"' . ($is_mobile ? ' data-toggle="tooltip"' : '') . ' title="' . date('Y年m月d日 H:i:s', strtotime($comment->comment_date)) . '">' . zib_get_time_ago($comment->comment_date) . '</span>'.'<span class="comt-author" title="">'.$diqu.'</span>';网上流行的基本都有问题,上传后前台评论错误,后台显示乱码,本站的已经完全修复,可查看本站下方评论, 把本压缩包上传到主题的根目录,注意不是WordPress根目录 加入function.php 在 php 作用域内,添加两行代码: include("show-useragent/show-useragent.php"); // 显示访客信息 include("show-useragent/ip2c-text.php"); // IP归属地和运营商查询功能 /wp-content/themes/zibll/inc/functions/zib-comments-list.php 51行的 return '<name class="flex ac flex1"> 替换代码 $ip = convertip(get_comment_author_ip()); return '<name class="flex ac flex1">' . $user_name . $badge .'<span class="badg badge badg-sm flex0 ml3">'.$ip.'</span>'.'</name>'; 然后 搜索 $time_html 在第一个 //时间 直接替换 代码 $diqu = CID_get_comment_browser(); $diqu .= CID_print_comment_flag(); $time_html = '<span class="comt-author"' . ($is_mobile ? ' data-toggle="tooltip"' : '') . ' title="' . date('Y年m月d日 H:i:s', strtotime($comment->comment_date)) . '">' . zib_get_time_ago($comment->comment_date) . '</span>'.'<span class="comt-author" title="">'.$diqu.'</span>';网上流行的基本都有问题,上传后前台评论错误,后台显示乱码,本站的已经完全修复,可查看本站下方评论, 把本压缩包上传到主题的根目录,注意不是WordPress根目录 加入function.php 在 php 作用域内,添加两行代码: include("show-useragent/show-useragent.php"); // 显示访客信息 include("show-useragent/ip2c-text.php"); // IP归属地和运营商查询功能 /wp-content/themes/zibll/inc/functions/zib-comments-list.php 51行的 return '<name class="flex ac flex1"> 替换代码 $ip = convertip(get_comment_author_ip()); return '<name class="flex ac flex1">' . $user_name . $badge .'<span class="badg badge badg-sm flex0 ml3">'.$ip.'</span>'.'</name>'; 然后 搜索 $time_html 在第一个 //时间 直接替换 代码 $diqu = CID_get_comment_browser(); $diqu .= CID_print_comment_flag(); $time_html = '<span class="comt-author"' . ($is_mobile ? ' data-toggle="tooltip"' : '') . ' title="' . date('Y年m月d日 H:i:s', strtotime($comment->comment_date)) . '">' . zib_get_time_ago($comment->comment_date) . '</span>'.'<span class="comt-author" title="">'.$diqu.'</span>';
免费下载和付费下载区别:
PS:本站所有资源均可以免费下载(免费和付费唯一区别就是下载速度不同)
免费下载链接为低速下载通道
付费下载链接为多线程高速下载通道
PS:本站所有资源均可以免费下载(免费和付费唯一区别就是下载速度不同)
免费下载链接为低速下载通道
付费下载链接为多线程高速下载通道
© 版权声明
THE END
暂无评论内容