Frequently asked questions

How do I restrict Autocomplete to a Specific Country

4min

Overview

This section covers how to restrict the autocomplete results of a store locator search to only return results from a specific country.

Prerequisites

The Following Plugin/s need to be installed and active

  • WP Go Maps
  • WP Go Maps Pro Add-on

Enabling the setting

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

Selecting the country to restrict search results to
Selecting the country to restrict search results to
ο»Ώ

Setting in Action

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)

Autocomplete results restricted to the selected countr
Autocomplete results restricted to the selected countr
ο»Ώ

ο»Ώ