---
title: "How to Search Posts by Custom Field in Elementor?"
url: https://theplusaddons.com/docs/search-posts-by-custom-field-in-elementor/
date: 2024-01-02
modified: 2026-08-17
lang: en
author: "Aditya Sharma"
description: "The Search Bar widget in The Plus Addons for Elementor lets you search posts, pages, products, or custom post types by custom field data in Elementor. Use it when standard..."
image: https://theplusaddons.com/wp-content/uploads/2023/09/How-to-Search-Posts-by-Custom-Field-in-Elementor_-1024x536.jpg
word_count: 799
---

# How to Search Posts by Custom Field in Elementor?

## 

- The Search Bar widget in The Plus Addons for Elementor searches posts, pages, products, or custom post types by custom field data when title-based search is not enough.
- Advanced Custom Fields (ACF) is required, and the setup needs Elementor FREE Plugin, The Plus Addons for Elementor, the Search Bar widget activated, and at least one custom field group assigned to a post type.
- ACF creates a checkbox field called Location in the example, with the location rule set to Post so the field appears on all posts.
- Search Bar uses Source set to Post, Select Type set to Posts, and Standard Search > ACF Filters with the exact ACF Key field name so visitors can filter by values such as location names.

The Search Bar widget in The Plus Addons for Elementor lets you search posts, pages, products, or custom post types by custom field data in Elementor. Use it when standard title-based search is not enough and visitors need to filter results by a specific attribute stored in a custom field.

*To check the complete feature overview documentation of The Plus Addons for Elementor Search Bar widget, [click here](https://theplusaddons.com/docs/search-bar-widget-settings-overview/).*

**Best Used For:**

- Blogs or directories where visitors need to filter posts by a location, category, or tag stored as a custom field

- WooCommerce stores that need product search by a custom attribute such as brand or material

- Membership or portfolio sites that need to filter custom post types by ACF field values

## Required Setup

- [Elementor FREE Plugin](https://wordpress.org/plugins/elementor/) installed & activated.

- You need to have [The Plus Addons for Elementor](https://wordpress.org/plugins/the-plus-addons-for-elementor-page-builder/) plugin installed and activated.

- Make sure the Search Bar widget is activated, to verify this visit The Plus Addons → Widgets → and Search for **Search Bar** and activate.

- The [Advanced Custom Fields (ACF)](https://wordpress.org/plugins/advanced-custom-fields/) plugin installed and at least one custom field group created and assigned to a post type.

## How to Activate the Search Bar Widget?

Go to

- **The Plus Addons** → **Widgets**

- **Search** the widget name and **turn on the toggle.**

[LIVE WIDGET LINK](https://theplusaddons.com/plus-search-filters/advanced-wp-ajax-searchbar/?utm_source=tpae&utm_medium=docs&utm_campaign=text)

## How to Search Posts by Custom Field in Elementor?

Before adding the Search Bar widget, create at least one custom field for a post type using the [Advanced Custom Fields (ACF)](https://wordpress.org/plugins/advanced-custom-fields/) plugin.

As an example, this guide creates a checkbox custom field called Location for standard blog posts, then sets up the Search Bar widget to let visitors filter posts by that field.

### Create Custom Fields

With the ACF plugin installed, follow these steps to create a custom field.

1. From the WordPress dashboard, go to **ACF** > **Field Groups** and click **Add New**.

2. Enter a name for the field group.

3. Add a field type and a name. For this example, add a **Checkbox** field and name it **Location**.

4. In the **Settings** section, set the location rule to **Post** under **Rules** so the field appears on all posts.

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

5. Click **Save Changes**.

6. Open a post and enter values in the **Location** custom field.

![add custom field data post](https://theplusaddons.com/wp-content/uploads/2023/09/add-custom-field-data-post.png)

### Use the Search Bar Widget

Add the Search Bar widget to the page or template where the search form should appear.

1. Open the item under **Search Bar** and select **Post** from the **Source** dropdown.

2. From the **Select Type** dropdown, select **Posts**.

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

A dropdown appears beside the search bar for visitors to select a value.

Adjust the **Label**, **Placeholder**, and **Show Index** sections as needed.

3. Go to the **Standard Search** tab and click the pencil icon on **ACF Filters**.

4. In the **ACF Key** field, enter the custom field name. To find the exact field name, open the field group in ACF and copy the name from the field settings.

![acf custom field post](https://theplusaddons.com/wp-content/uploads/2023/09/acf-custom-field-post-1.png)

![search bar acf options](https://theplusaddons.com/wp-content/uploads/2023/09/search-bar-acf-options.png)

Visitors can now search posts by the custom field values — in this example, by location names.

You can use the same approach to search pages, WooCommerce products, or any custom post type by custom field data.

***Suggested Read:** [How to Search Specific Custom Post Types in Elementor?](https://theplusaddons.com/docs/search-specific-custom-post-types-in-elementor/)*

***Suggested Read:** [How to Create Search Filter for Custom Posts in Elementor?](https://theplusaddons.com/docs/create-search-filter-for-custom-posts-in-elementor/)*

## FAQ

**How do I search posts by custom field in Elementor?**
Add the Search Bar widget from The Plus Addons for Elementor, set **Source** to **Post** and **Select Type** to **Posts**, then go to **Standard Search** > **ACF Filters** and enter your ACF field name in the **ACF Key** field.

**Does searching by custom field in Elementor require ACF?**
Yes. The Search Bar widget ACF Filters option requires the Advanced Custom Fields (ACF) plugin. Install ACF, create a field group, and assign it to your post type before configuring the Search Bar widget.

**How do I find the ACF field name for the ACF Key field?**
Open the field group in ACF and check the **Name** column next to the field. That is the value to enter in the **ACF Key** field of the Search Bar widget.

**Can I search custom post types by custom field in Elementor?**
Yes. In the Search Bar widget, set **Source** to **Post** and select your custom post type from the **Select Type** dropdown, then configure the ACF Filters with your field name.

**The custom field search is not returning results — how do I fix it?**
Verify that the custom field has values saved on the posts you are searching, that the ACF Key matches the exact field name in ACF, and that the field group is assigned to the correct post type in the **Rules** section of ACF.

## Related Docs

- [Search Bar Widget Settings Overview](https://theplusaddons.com/docs/search-bar-widget-settings-overview/)

- [How to Search Specific Custom Post Types in Elementor?](https://theplusaddons.com/docs/search-specific-custom-post-types-in-elementor/)

- [How to Create Search Filter for Custom Posts in Elementor?](https://theplusaddons.com/docs/create-search-filter-for-custom-posts-in-elementor/)