开发者 | raiserweb |
---|---|
更新时间 | 2016年6月16日 18:28 |
捐献地址: | 去捐款 |
PHP版本: | 3.0.1 及以上 |
WordPress版本: | 4.5 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/
directoryThis plugin is for when you are using the Advanced Custom Fields Type 'Google Map' on posts, and you wish to display a distance ordered search results page on your site.
Unfortunately, the Advanced Custom Fields Type 'Google Map' does not make it easy to query posts based on a radius distance search. This plugin makes this possible.
To use this plugin, first install the plugin as normal. The plugin will then work whenever you add 'lng' and 'lat' variables into a search results page url. For example: example.com/search/?lng=51.023232&lat=12.232323
The best way to do this, is to use the Google Places Autocomplete API to allow users to select a location in your search form. Upon selecting a location, you will be able to access the lng and lat values provided by Google. These can then be populated into the search result URL.
Yes, your Advanced Custom Field Type 'Google Map' will need to be named 'address'.