Restrict Searches to Specific Countries

Agile Store Locator displays all the user’s stores on the map. However, if a user has stores in multiple countries and they wish to restrict the search to a specific country (or countries), this is also possible with Agile Store Locator.

The option to limit searches to one or more countries is available on Agile Store Locator. Furthermore, If a user wants to limit store searches to a specific country(s), please follow the below steps:

  1. Go to “ASL Setting” from the main dashboard
  2. Scroll down to the “Restrict Search” field 
  3. Type in the country codes you want to add search restrictions to (eg. US, UK, AU, etc.)
Restrict Country Field
Restrict Country Field

4. Finally, press the “Save Settings” button

Once finished, you will have successfully restricted the store search to specific countries.

How to Override the Restrictions for Multiple Store Locators? #

To ensure that a set of restricted values (countries) don’t interfere with other store locator pages, users can override the values with the shortcode attribute country_restrict shown below: 

[ASL_STORELOCATOR country_restrict="au"] 

How to Apply the State Restriction? #


If your store is located in a city that shares the same name with another city in a different state, like Portland in both Maine and Oregon, it’s crucial to ensure that customers searching for your store find the correct location. To address this issue, you can implement a shortcode attribute in your geocoding requests. This attribute will enable you to send the state name along with the city name when users search for your store’s location. By doing so, the geocoding service can accurately distinguish between the two cities and present the relevant results to users, ensuring they find your store in the correct state without any confusion.

[ASL_STORELOCATOR state_restrict="1"]

Limitations of the Country Restrict Feature #

While the Agile Store Locator allows you to restrict searches to specific countries, there are some limitations to be aware of:

Single Country Code Limitation #

The Google Geocoding API, which the Agile Store Locator uses for geocoding requests, supports only one country code for restriction at a time. This means that if you set a country restriction, you can only limit the search to one specific country.

country restrict field

Multiple Countries Restriction #

If you need to restrict searches to multiple countries, the Geocoding API will not be sufficient. Instead, you should use the Google Places API, which allows for more flexible and comprehensive search capabilities, including the ability to restrict searches to multiple countries.

Google Place API Search

Please note that the enter key initiates the Geocoding Request while Place API is selected out of the Google Place API widget.

Google Geocoding API limitation

This limitation is inherent to Google APIs and cannot be changed from within the Agile Store Locator plugin. Therefore, users who require search restrictions for multiple countries must utilize the Places API for their search needs.