---
title: "How to Create Range Filter for Custom Posts with Custom Fields in Elementor? (ACF, Pods, Metabox)"
url: https://theplusaddons.com/docs/create-range-filter-for-custom-posts-with-custom-fields-in-elementor/
date: 2023-09-14
modified: 2026-04-10
author: "Aditya Sharma"
description: "Do you want to create a range filter for your custom post types in Elementor? A range filter can be useful for custom post types that contain numerical data such..."
image: https://theplusaddons.com/wp-content/uploads/2023/09/How-to-Create-Range-Filter-for-Custom-Posts-with-Custom-Fields-in-Elementor_-ACF-Pods-Metabox-1024x536.jpg
word_count: 558
---

# How to Create Range Filter for Custom Posts with Custom Fields in Elementor? (ACF, Pods, Metabox)

## Key Takeaways

- WP Search Filters widget from The Plus Addons for Elementor allows users to create a range filter for custom post types based on custom fields.
- Advanced Custom Fields (ACF) can be used to create custom fields for a custom post type, such as Books, by setting a maximum and minimum range.
- Users must enable both WP Search Filters and Dynamic Listing widgets from The Plus Settings to utilize the range filter functionality.

Do you want to create a range filter for your custom post types in Elementor? A range filter can be useful for custom post types that contain numerical data such as price, quantity etc.

With the WP Search Filters widget from The Plus Addons for Elementor, you can easily create a range filter for custom post types based on custom fields. 

*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 have created at least one custom post type, you can use the free[ Advanced Custom Fields (ACF)](https://wordpress.org/plugins/advanced-custom-fields/) to[ create a custom post type](https://www.advancedcustomfields.com/resources/registering-a-custom-post-type/).

For instance, we have created a custom post type called Books. 

### Create Custom Fields

First, you have to create some custom fields for your custom post types 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 range field and add a name.

4. From the Validation tab, set the maximum and minimum range for the range field.

![acf set range field](https://theplusaddons.com/wp-content/uploads/2023/09/acf-set-range-field.gif)

5. Once done, from the **Settings** section, set the location to your custom post types i.e. Book under **Rules**.

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

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

7. Then, you have to add value in the custom fields on some custom posts.

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

### Use the WP Search Filters Widget

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

> *Note: Make sure you’ve enabled both WP Search Filters and Dynamic 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 Dynamic Listing widget, select **Search List** from the **Post Listing Types** dropdown.

2. Then select your custom post type from the **Post Type** dropdown.

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

3. After that, select the appropriate style and layout.

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

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

6. Then, from the **Select Source** dropdown, select **Range Slider**.

7. From the **Select Type** dropdown, select **ACF connection**. 

> *Note: Since we have used ACF to create the custom fields, we have selected ACF connection. So if you have created the custom fields with other plugins like PODs, Metabox or Toolset select the option accordingly.*

8. In the **Connection Key** field, you have to add the custom field name.

To find the field name in ACF, edit the field group there you will find the field name.

![acf field name cpt number](https://theplusaddons.com/wp-content/uploads/2023/09/acf-field-name-cpt-number.png)

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

In the **Price Symbol** field, you can add a symbol for the number.

Now, you’ll see a range filter that you can use to filter your custom posts.

Following this process you can add a range filter to any other post types as well.

Also, read [How to Add WooCommerce Product Price Range Filter in Elementor](https://theplusaddons.com/docs//add-woocommerce-product-price-range-filter-in-elementor/).

## Frequently Asked Questions

**Q: What should I do if my range filter isn't displaying correctly?**
A: If your range filter isn't displaying, check that both the WP Search Filters and Dynamic Listing widgets are enabled in The Plus Settings. If they are enabled, ensure that you've correctly set the connection key to match the custom field name in ACF. A mismatch here can prevent the filter from functioning properly.

**Q: What are the best practices for setting the range values in custom fields?**
A: When setting the range values in your custom fields, it's crucial to define realistic minimum and maximum values that reflect the data you expect. This ensures users can effectively filter results. Additionally, consider the types of data your posts will contain to avoid confusion or frustration when users interact with the range filter.

**Q: How do I ensure my custom fields are properly assigned to my custom post types?**
A: To ensure your custom fields are properly assigned, go to ACF and set the location rules for your field group. Select your custom post type under the Rules section. This step is essential for the fields to appear when editing your custom posts, allowing you to input the necessary data for the range filter.

**Q: Does the WP Search Filters widget support filtering by multiple custom fields?**
A: The WP Search Filters widget primarily supports filtering based on a single custom field connection at a time. If you need to filter by multiple custom fields, you would need to set up additional filters for each field separately. This allows for more granular control over the filtering process, but requires careful setup to ensure clarity for users.
