- Download the plugin from Templatic member area.
- Navigate to wp-admin ⇨ Plugins ⇨ Add New ⇨ Upload. Use the “Browse” button to load the previously downloaded .zip file. Click on “Install Now” to confirm.
- Once the plugin is finished installing click on the “Activate” button.
Using the Plugin
To use this plugin simply enter a zip code into the “T – Advanced Search” widget. The plugin will search through your addresses and display listings accordingly. The search result will show the distance (in kilometers by default) between the searched zip code and the address of the listings listed in the search results as shown in the screenshot below.
New Feature in Proximity Search version 1.0.3
With this new version, the search result will show the distance (in kilometers by default) between User’s IP location and the address of the listings listed in the search results as shown in the screenshot below. Suppose If you are in “New York” city and search the restaurant in “New York” city, it will not show you the result through your IP location and display the listing accordingly.
T – Advanced Search is the only supported search widget. Using others (e.g. T – Instant Search) will not work. With that said, you can use the Advanced Search widget inside the Header widget area.
The plugin will not work properly if “Search By Distance” option is enabled into the Advanced Search widget for Address field. With this New Version, If you are in New York City and tried to search the listing in the same city, it will show you the distance between your current IP address the listing’s address. And if a user is in “New York” city and he has selected some other city in a header and trying to search the listing, then you will not get the results. Because it will search the IP location of the city and search the results within that city. In this case, you can use the “T-Instant Search” widget to search the results.
Frequently Asked Questions
How to show the distance in miles instead of kilometers in search results?
For this go to file proximitysearch_filter.php located at plugins\Tevolution-ProximitySearch\ and in this file on line no 186 change the code from
$distance = number_format(($address_distance/1000),2); to
$distance = number_format(($address_distance*0.00062137),2); Also change the value of $radius_type variable on lines 189 and 193 from ‘km’ to ‘mile’ and ‘kms’ to ‘miles’.
How to change the place holder “Where?” in T – Search by Address widget at front end?
Go to file widget.php located at plugins\Tevolution-Directory\google-maps\ and on line 348 find the below code .
Just change the value ‘Where?’ in this code
How to change the distance mode from driving ( default ) to other modes?
For this go to file proximitysearch_filter.php located at plugins\Tevolution-ProximitySearch\ and on line 179 look for the code
$geocode = file_get_contents($http.'maps.googleapis.com/maps/api/distancematrix/json?origins='. and add the modes i.e either driving,walking or bycycling as shown below
$geocode = file_get_contents($http.'maps.googleapis.com/maps/api/distancematrix/json?mode=walking&origins='.
driving -(default) indicates standard driving directions using the road network.
walking – requests walking directions via pedestrian paths & sidewalks (where available).
bicycling – requests bicycling directions via bicycle paths & preferred streets (currently only available in the US and some Canadian cities).
For more info on the modes please refer the link https://developers.google.com/maps/documentation/distancematrix/#RequestParameters
How to translate the plugin?
You can translate the plugin by using the language file located inside the /languages folder. For instructions on handling PO and POT files open the following article