---
title: "How to Create Location Based Filter for WooCommerce Products in Elementor?"
url: https://theplusaddons.com/docs/create-location-based-filter-for-woocommerce-products-in-elementor/
date: 2023-09-14
modified: 2026-04-10
author: "Aditya Sharma"
description: "Do you want to add a location based filter to your WooCommerce store? Location-based filters help customers find products that are relevant to their geographical location. This not only improves..."
image: https://theplusaddons.com/wp-content/uploads/2023/09/How-to-Create-Location-Based-Filter-for-WooCommerce-Products-in-Elementor_-1024x536.jpg
word_count: 413
---

# How to Create Location Based Filter for WooCommerce Products in Elementor?

## Key Takeaways

- WP Search Filters widget from The Plus Addons for Elementor allows users to add a location-based filter for WooCommerce products.
- Advanced Custom Fields (ACF) can be used to create custom fields for location in WooCommerce products.
- Users must enable both WP Search Filters and Product Listing widgets from The Plus Settings to utilize the filtering feature.

Do you want to add a location based filter to your WooCommerce store? Location-based filters help customers find products that are relevant to their geographical location. This not only improves the customer experience but also increases the chances of a sale.

With the WP Search Filters widget from The Plus Addons for Elementor, you can easily add a location based filter for your WooCommerce products.

*To check the complete feature overview documentation of The Plus Addons for Elementor WP Search Filters widget, [click here](/docs/wp-search-filters-widget-settings-overview/).*

***Requirement  - This widget is a part of The Plus Addons for Elementor, make sure its installed & activated to enjoy all its powers.***

[LIVE WIDGET LINK](https://theplusaddons.com/elementor-listing//#search-filter-wgts?utm_source=tpae&utm_medium=docs&utm_campaign=text)

To do this, make sure you’ve added some products to your WooCommerce store. 

### Create Custom Fields

For this, you have to create custom fields for location and assign values to them.

You can use ACF, PODs, Metabox and Toolset plugins for creating custom fields, for instance, we’ll use the free[ Advanced Custom Fields (ACF)](https://wordpress.org/plugins/advanced-custom-fields/) to create the custom fields.

Once you have the installed plugin follow the steps - 

1. To do this from the Dashboard, go to **ACF** > **Field Groups** and click on **Add New** button. 

2. Add a name to the field group.

3. Then add a text field and add a name.

4. Once done, from the **Settings** section, set the location to **Product** under **Rules**.

![add text fields product](https://theplusaddons.com/wp-content/uploads/2023/09/add-text-fields-product.png)

5. Once done, click on the **Save Changes** button.

6. Then, you have to add location coordinates in the custom field of products.

> *Note: You can use *[*latlong.net*](https://www.latlong.net/)* to find the location latitude and longitude values.*

![assign location custom fields product](https://theplusaddons.com/wp-content/uploads/2023/09/assign-location-custom-fields-product.png)

### Use the WP Search Filters Widget

You have to use the WP Search Filters widget with the Product Listing widget.

> *Note: Make sure you’ve enabled both WP Search Filters and Product Listing widgets from The Plus Settings.*

Place the widgets in your desired location on the page or template, then follow the steps -

1. In the Product Listing widget, select **Search List **from the **Product Listing Types** dropdown.

![product listing search list](https://theplusaddons.com/wp-content/uploads/2023/08/product-listing-search-list.png)

2. Then select the appropriate style and layout.

3. In the WP Search Filters widget, open the **Category** item under the **Filter Area**.

4. From the **Filter Type** dropdown, select **WP Filter**.

5. Then from the **Select Source** dropdown, select **Autocomplete**.

6. From the **Select Type** dropdown, select **Taxonomy**. 

![wp search filters autocomplete](https://theplusaddons.com/wp-content/uploads/2023/09/wp-search-filters-autocomplete.png)

Now you’ll see a search field that you can use to filter products based on different locations.

Also, read [How to Filter WooCommerce Products by Attribute in Elementor](https://theplusaddons.com/docs/filter-woocommerce-products-by-attribute-in-elementor/).

## Frequently Asked Questions

**Q: What should I do if the location-based filter is not showing up on my WooCommerce products?**
A: If the location-based filter isn't appearing, ensure that both the WP Search Filters and Product Listing widgets are enabled in The Plus Settings. If they are enabled and still not visible, double-check that you've correctly set up the custom fields for location and assigned values to them in your products.

**Q: What is the best way to create custom fields for location in WooCommerce?**
A: Using the Advanced Custom Fields (ACF) plugin is a recommended approach for creating custom fields for location in WooCommerce. After installing ACF, create a new field group, add a text field for location, and set the location rules to 'Product'. This method ensures that each product can have specific geographical data, improving the relevance of your location-based filters.

**Q: What happens if I forget to save changes after creating custom fields?**
A: If you forget to save changes after creating custom fields in ACF, those fields will not be applied to your products. This means that the location-based filter will not function as intended, potentially leading to a poor user experience. Always ensure to click 'Save Changes' after making modifications to avoid this issue.

**Q: Are there any limitations when using location-based filters with WooCommerce products?**
A: One limitation to consider is that the location-based filter relies on accurate latitude and longitude values assigned to your products. If these values are incorrect or missing, the filter may not yield the desired results. Using resources like latlong.net can help ensure you have the correct coordinates, enhancing the effectiveness of your filter.
