document.writeln('');
代碼已經為大家修改好了 只需要上傳即可調用,廢話不多說 直接上教程!
下載地址:
例如,使用的主題是 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>;效果可以看本站的評論?。?!