# Filter by Location

### Search by Location

{% hint style="info" %}
The filter by location will work in the new listings. To enable them in the existing listings, make some changes in location and save them.
{% endhint %}

In this section, you can enable showing the search results by filtering the particular location. To enable this option, turn on the Show Location/Include Location in Filter option. The option sorts the listings by selected location.

{% hint style="info" %}
The Filter by location option **is not available** on the **Aircrafts, Rent a car, Rental Two**, and **Equipment** layouts.
{% endhint %}

<figure><img src="https://2954064479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDP3ivYPbpYO9Rs_wuB%2Fuploads%2FEJ9uxA8p0ElYtxHAIqgX%2Flocation%201.jpg?alt=media&#x26;token=6c3a49cd-6a54-41cb-88f7-7fafb61822d5" alt=""><figcaption></figcaption></figure>

On the **Unit Measurement** field indicate the unit measurement for distance and enter the search radius on the **Set Max Search Radius** section.&#x20;

<figure><img src="https://2954064479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDP3ivYPbpYO9Rs_wuB%2Fuploads%2FpZrgT4PMDlgurEHGH7Gi%2FMotors%205.20%20-%20Classified%20Inventry%20search%20by%20location.png?alt=media&#x26;token=73adc17a-7307-4106-88e0-bcae10f297ea" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**For the Filter by location option, the Google Map API Key should be entered on the  Theme Options > General > Google API Key field.** Read [this doc from Google](https://developers.google.com/maps/documentation/javascript/get-api-key) to learn more about finding Google Map API Key.
{% endhint %}

You can enable showing the recommendations of other listings if there are no results available in this search intent. To do this, enable **Recommend items in other locations in case of empty result option.**&#x20;

<figure><img src="https://2954064479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDP3ivYPbpYO9Rs_wuB%2Fuploads%2FQEPSCsjEt2XympgvczUE%2Flocation%203.jpg?alt=media&#x26;token=2fe40708-0f3f-4486-a7b9-371bf57bd5ae" alt=""><figcaption></figcaption></figure>

This is how it will look on the user's page:

<figure><img src="https://2954064479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDP3ivYPbpYO9Rs_wuB%2Fuploads%2F7VuVOM62J0GmQ0ftBjYe%2Flocation%204.jpg?alt=media&#x26;token=31abcb8b-6b0c-485c-9ed6-e81193484e3b" alt=""><figcaption></figcaption></figure>

### **Search by Distance**

You can allow your users to filter based on the radius of the location. To do this, turn on the **Distance search.**

<figure><img src="https://2954064479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MDP3ivYPbpYO9Rs_wuB%2Fuploads%2FUhtVZcJELgSvygYOmnDB%2Flocation%202.jpg?alt=media&#x26;token=98da1554-26cc-4482-9267-611d2bfe969f" alt=""><figcaption></figcaption></figure>
