How do I restrict Autocomplete to a Specific Country
This section covers how to restrict the autocomplete results of a store locator search to only return results from a specific country.
The Following Plugin/s need to be installed and active
- WP Go Maps
- WP Go Maps Pro Add-on
There are times when site owners need to restrict the Store Locator Autocomplete list to show only locations in a specific country. This is done using theΒ Store LocatorΒ settings panel.
Please navigate as follows:
WP Go MAPS -> Maps (edit your chosen map) -> Settings -> Store Locator -> Advanced -> Restrict to country
Please select the country you would like to restrict search results to from the drop down "Restrict to country" option. Then please save map
When a visitor types in the search field of theΒ Store Locator, only results in your selected country are shown in the results drop-down. In the example below, the autocomplete suggestions for Paris are restricted to addresses that contain the word Paris in the UK only as per the Country restriction that was set (United Kingdom)
ο»Ώ