這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

WP Geoloc

外掛說明

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

安裝方式

Installation instructions :

  • Upload to plugins dir
  • Activate plugin

Configuration instructions :

  • If you want to use the widget and the Google place autocomplete, then you need a Google Places API KEY. Get your Google Places API key here : https://developers.google.com/places/web-service/get-api-key
  • Add a location for each post you wish to geotag. A box is provided for this purpose in post edit mode.
  • Enjoy the geolocated requests.

常見問題集

How to get a Google Places API KEY?
  • Simply follow instructions here : https://developers.google.com/places/web-service/get-api-key

使用者評論

2016 年 9 月 3 日
Great plugin that does exactly what I need 🙂 Keep going !
閱讀全部 1 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈WP Geoloc〉的開發相關工作。

參與者

將〈WP Geoloc〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.2

  • standardization of code

1.0.1

  • New : widget to search geolocated content.
  • New : shortcode to include the geolocated search form in any post.
  • New : translations in French
  • Fix : Prevent XSS and other attacks

1.0.0

  • Initial release