
內容簡介
這款外掛可以在 WordPress 中添加地理定位功能,讓使用者可以找到鄰近自己或特定距離內的文章。
您可以使用小工具來選擇特定的位置,或是使用 URL(提供緯度、經度和距離等 GET 參數)來發送請求。
小工具和短碼包含了 Google 自動完成和距離範圍滑桿。
小工具:
到小工具區域,然後將小工具放在區域中。
玩得開心!
短碼:
只需在想要放置搜尋框的位置添加此代碼即可:[wpgeoloc]
使用 URL 進行操作:
例如:在 archive 頁面上,您正在查找以這個緯度 [50.8385607] 和這個經度 [4.37526040] 為中心,位於 10 英里半徑內的餐廳:
http://www.example.com/category/restaurant?latitude=50.8385607&longitude=4.37526040&distance=10
您可以在帶有關鍵字“ super ”的搜尋頁面上執行此操作:
http://www.example.com/?s=super&latitude=50.8385607&longitude=4.37526040&distance=10
要求:
如果您想使用小工具和 Google 地點自動完成功能,則需要 Google 地點 API 金鑰。
如何獲取 Google 地點 API 金鑰:
* https://developers.google.com/places/web-service/get-api-key
貢獻
Github:https://github.com/NicolasBlois/wp-geoloc
特點
URL:使用在 URL 中提供的緯度,經度和距離進行搜索的功能
Widget:小工具包含 Google 自動完成和距離範圍滑桿
短碼:短碼生成 Google 自動完成和距離範圍滑桿。用法:[wpgeoloc]
翻譯
英語 - 默認,始終包括在內
法語
外掛標籤
開發者團隊
原文外掛簡介
This plugin adds geolocation functionnalities to your wordpress, it allows you to find posts around you or a location with a specific distance radius.
You can select a specific location with the widget or you can make a request with URL by providing latitude, longitude and distance as GET parameters.
The widget and the shortocode consists of a Google Autocomplete and a distance range slider.
Widget :
Go in widget area, then place the widget in a zone.
Have fun !
Shortcode :
Simply add this code where you want to place the search box : [wpgeoloc]
Play with URL:
For example : on an archive page, you are looking restaurants located in a 10 miles radius from this latitude [50.8385607] and this longitude [4.37526040] :
http://www.example.com/category/restaurant?latitude=50.8385607&longitude=4.37526040&distance=10
You can do it on the search page with the keyword “super” :
http://www.example.com/?s=super&latitude=50.8385607&longitude=4.37526040&distance=10
Requirement :
If you want to use the widget and the Google place autocomplete, then you need a Google Places API KEY.
How to get a Google Places API key :
* https://developers.google.com/places/web-service/get-api-key
Contributions
github : https://github.com/NicolasBlois/wp-geoloc
Special Features
URL : search with latitude, longitude, distance provided as GET parameters in URL.
Widget : the widget consists of a Google Autocomplete and a distance range slider.
Shortcode : the shortcode generates a Google Autocomplete and a distance range slider. Usage : [wpgeoloc]
Translations
English – default, always included
French
