Do you want to create a search filter for custom post types in Elementor? If you have a lot of posts in your custom post type, adding a search filter can be a great way to enhance your website’s functionality and provide a better user experience.
With the WP Search Filters widget from The Plus Addons for Elementor, you can easily add a search filter for your custom post type.
To check the complete feature overview documentation of The Plus Addons for Elementor WP Search Filters widget, click here.
Requirement – This widget is a part of The Plus Addons for Elementor, make sure its installed & activated to enjoy all its powers.
To do this, make sure you have created at least one custom post type, you can use the free Advanced Custom Fields (ACF) to create a custom post type.
For instance, we have created a custom post type called Books.
Once you’ve created your custom post type, then you have to use the WP Search Filters widget with the Dynamic Listing widget.
Note: Make sure you’ve enabled 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.
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 and Search Input from the Select Source dropdown.
6. Then select Taxonomy from the Select Type dropdown.
7. In the Placeholder Text field, you can add a placeholder text.
8. From the Generic Filters section, you can set which part the search will be performed.
Search in Title – This will search the item title.
Search in Content – This will search the item content.
Search in Name – This will search the item slug.
Search in Excerpt – This will search the item excerpt content.
Search in Category – This will search the item category.
Search in Tags – This will search the item tag.
Search Type – From here you set the type of search, you can keep it to default or make it full match where it will only show items with an exact match.
You can mix these options to expand the search area as per your requirements.
Now you’ll see a search input field where you can easily search your custom posts.
Also, read How to Add WooCommerce Live Product Search in Elementor.