2022 WP子比主題評論IP屬地顯示,網站搭建
導讀:網站搭建網站搭建?? 我看沒人發就想做第一個 首先下載文件壓縮包,直接上傳在wp-content/themes/zibll目錄下并解壓,再將show-useragent文件復制自助建站技術技術貓建站。
??
我看沒人發就想做第一個
首先下載文件壓縮包,直接上傳在wp-content/themes/zibll目錄下并解壓,再將show-useragent文件復制一份到網站根目錄。
然后替換代碼: 1.在wp-content/themes/zibll目錄的 functions.php 添加兩行代碼 詳情見圖一 —————————- include(“show-useragent/show-useragent.php”); // 顯示訪客信息 include(“show-useragent/ip2c-text.php”); // IP歸屬地和運營商查詢功能 —————————-
2.將/wp-content/themes/zibll/inc/functions/zib-comments-list.php 51行的
return ‘<name class=”flex ac flex1″>
替換代碼為以下內容 詳dede手機模板情見圖二 —————————- $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>’; —————————-
3.完成上面那步后不要退出,然后搜索 $time_html 在第一個 //時間 下面直接替換代碼 詳情見圖三 —————————- $diqu = CID_get_comment_browser();dede網站模板 $diqu .= CID_print_comment_flag(); $time_html = ‘<span class=”comt-author”‘ . ($is_mobile ? ‘ data-toggle=”tooltip”‘ : ”) . ‘手機模板dede 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>’;????
1.下載依賴文件:https://cloud.189.cn/t/Jn6nmu6Zb6vy?(訪問碼:94my)
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-23 ,文章2022 WP子比主題評論IP屬地顯示,網站搭建主要講述屬地,主題,IP網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_35052.html