前言介紹
- 這款 WordPress 外掛「Geolocator」是 2015-03-25 上架。
- 目前有 60 個安裝啟用數。
- 上一次更新是 2017-11-27,距離現在已有 2715 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.1.1 以上版本才可以安裝。
- 有 4 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
geolocator | ip location | user country | show for country | ip based location |
內容簡介
這個外掛可以透過 IP 位置辨識訪客的所在地並根據國家顯示或隱藏特定內容。
自訂欄位
在文章編輯頁面的自訂欄位中,填入“隱藏於”欄位即可將文章隱藏於特定的國家。這樣該文章就不會出現在網站的其他部分。
短代碼
國家
此外掛最基本的短代碼是 [geolocator],它會顯示訪客所在的國家。
顯示
你可以使用 [geolocator_show] 短代碼在特定國家顯示特定內容。請見以下範例。
[geolocator_show for="US"]This information is being shown to visitors from United States only.[/geolocator_show]
此短代碼接受“for”屬性,應該填寫你想顯示內容的國家的兩位字母 ISO 代碼。
隱藏
你可以使用 [geolocator_hide] 短代碼在特定國家隱藏特定內容。請見以下範例。
[geolocator_hide for="US"]This information is NOT being shown to visitors from United States.[/geolocator_hide]
此短代碼接受“for”屬性,應該填寫你想隱藏內容的國家的兩位字母 ISO 代碼。
小工具
Geolocator 的小工具可以顯示訪客的國家,你也可以選擇自訂文字。
鳴謝
本外掛使用由 MaxMind 創建的 GeoLite2 資料,可從http://www.maxmind.com取得。
原文外掛簡介
Get website visitor’s location based on IP address and show/hide specific content depending on country.
Meta box
You can hide post for particular country by filling “Hide for” field in custom meta box in post’s edit screen. That way the post will not be included to the loop and other parts of the website.
Shortcodes
Country
The most basic shortcode of the plugin is [geolocator] which displays country of the visitor.
Show
You can show some specific content for particular country by using [geolocator_show] shortcode. See example below.
[geolocator_show for="US"]This information is being shown to visitors from United States only.[/geolocator_show]
The shortcode accepts “for” attribute. It should be a 2-letter ISO code of the country you want to show the content for.
Hide
You can hide some specific content for particular country by using [geolocator_hide] shortcode. See example below.
[geolocator_hide for="US"]This information is NOT being shown to visitors from United States.[/geolocator_hide]
The shortcode accepts “for” attribute. It should be a 2-letter ISO code of the country you want to hide the content for.
Widget
You can display country of the visitor by using Geolocator’s widget. It allows you to choose a custom text.
Credits
This plugin includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Geolocator」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。