---
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-04-10
author: "Aditya Sharma"
description: "Do you want to search posts by custom field data in Elementor? Custom fields allow you to add additional information to your posts, pages, products or custom post types. By..."
image: https://theplusaddons.com/wp-content/uploads/2023/09/How-to-Search-Posts-by-Custom-Field-in-Elementor_-1024x536.jpg
word_count: 423
---

# How to Search Posts by Custom Field in Elementor?

## Key Takeaways

- The Plus Addons for Elementor includes a Search Bar widget that allows users to search any post type based on custom field data.
- Users must create at least one custom field using the Advanced Custom Fields (ACF) plugin to utilize the Search Bar widget.
- The Search Bar widget enables searching posts by specific custom field names, such as location, after setting up the ACF filters.

Do you want to search posts by custom field data in Elementor? Custom fields allow you to add additional information to your posts, pages, products or custom post types. By allowing users to search posts by custom field data you can improve the search result.

With the Search Bar widget from The Plus Addons for Elementor, you can easily search any post type based on custom field data.

*To check the complete feature overview documentation of The Plus Addons for Elementor Search Bar widget, [click here](/docs/search-bar-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/plus-search-filters/advanced-wp-ajax-searchbar/?utm_source=tpae&utm_medium=docs&utm_campaign=text)

To do this, make sure you have created at least one custom field for any post type. You have to use the free[ Advanced Custom Fields (ACF)](https://wordpress.org/plugins/advanced-custom-fields/) to[ ](https://www.advancedcustomfields.com/resources/registering-a-custom-post-type/)create the custom field.

For instance, we’ll create a custom field called location for normal blog posts.

Then add the Search Bar widget on the page or template and follow the steps -

### Create Custom Fields

Once you have the ACF plugin installed follow the steps - 

1. 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 field type and add a name. For instance, we’ll add a checkbox field with the name called Location.

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

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

5. Then click on the **Save Changes** button.

6. After that you have to add value in the custom fields on some posts.

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

### Use the Search Bar Widget

Then add the Search Bar widget on the page or template.

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)

Now, you should be able to see a dropdown beside the search bar.

Then make the necessary changes to Label, Placeholder and Show Index sections.

3. After that, go to the **Standard Search** tab and click on the pencil icon of **ACF Filters**.

4. Then in the **ACF 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 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)

Now you’ll be able to search posts by location names.

In a similar way, you can search pages, products or custom post types by custom field data.

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

## Frequently Asked Questions

**Q: What should I do if my custom fields are not showing up in the Search Bar widget?**
A: If your custom fields are not appearing in the Search Bar widget, ensure that you have created at least one custom field using the Advanced Custom Fields (ACF) plugin. After creating the custom field, you must also add values to those fields in your posts. If the fields are still missing, double-check that the ACF plugin is properly installed and activated.

**Q: Can I search for posts based on multiple custom fields in Elementor?**
A: The Plus Addons for Elementor allows you to search posts based on custom field data, but the tutorial specifically mentions using a single custom field, like 'location'. If you want to search by multiple fields, you may need to set up additional search bar widgets, each configured for a different custom field.

**Q: What is the best way to set up custom fields for improved search results?**
A: For optimal search results, create descriptive and relevant custom fields that align with the content of your posts. Use the ACF plugin to define these fields clearly, and ensure they are populated with accurate data. This way, users can effectively search and filter results based on the specific information they are looking for.

**Q: What happens if I forget to save changes after creating a custom field?**
A: If you forget to save changes after creating a custom field in ACF, the field will not be available for use in the Search Bar widget. Always ensure you click the 'Save Changes' button after adding or modifying fields to ensure they are properly registered and can be utilized in your search functionality.

**Q: How can I find the ACF key for my custom field?**
A: To find the ACF key for your custom field, edit the field group in the ACF plugin. The key is typically displayed alongside the field name in the settings. This key is essential for configuring the Search Bar widget to filter results based on your custom field data.
