# 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="/files/S8pAeYOPSokyZqzD73eS" 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="/files/s4kdeqEU2aq5XZAuR5Rd" 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="/files/El3i6lmvVVL9Xlj29cvD" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/z2awULO9Ju6oYvhARWVR" 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="/files/G1wYTAGZBgyXes52w5Oq" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stylemixthemes.com/motors-theme-documentation/classified-layout-features/classified-inventory-page/filter-by-location.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
