Location search issue (region + radius)

We’re having a strange and inconsistent issue with the search field on the GeoLocations extension. A little bit about our setup:

  • Radius set to 60 miles in HP settings
  • Regions enabled
  • Google API

If I perform a new search, for example, I type in “Santa Clar” and then use the autocomplete dropdown to select the right location, this will update the search box to “Santa Clara, Washington County, Utah, United States”. If I then hit the search button to perform the search, the search results seem to only include results set within that specific region. It seems to ignore our radius preferences.

However, if I use U.S. zip code instead, so if I start typing “84765” and then use the autocomplete dropdown to select the city, it will change the search box field text to “Santa Clara, Washington County, Utah, United States” (notice it’s the same), but this time, when I hit the search button, the results correctly return everything within that city but also with the 60 mile radius.

It’s a bit confusing because as far as I can tell, it should be searching on the same data, but the autocomplete box must give the search form separate instructions behind the scenes?

But how can we fix this? How can we make sure that when users search for a city by name that the results include not just that specific region but also the 60 mile radius of that query?

Hi,

Regions work in a specific way: when you search by region, the search looks within the boundaries of that region rather than using a radius-based approach. When regions are enabled, radius-based search is only applied when users search more precisely—such as by street, neighborhood, or specific address. However, when searching by region name alone, it searches within the region’s boundaries. This is because a radius-based search would simply calculate from the center of the region, which wouldn’t make sense for non-circular regions.

In your case, searching by “Santa” works because this region has been generated, while searching by ZIP code uses radius-based search because the ZIP code level apparently isn’t included as a region level in HivePress > Settings > Geolocation. By default, only City, State, and Country are included, but you can try adjusting these settings to include ZIP codes as well.

If you prefer a 100% radius-based search approach, you can simply disable the regions feature in the settings.