How To Build A Divi Machine Search Bar - Search One CPT

Written by the Divi Engine Documentation Team

Introduction

Follow these steps to learn how to build a search bar/form that searches one CPT.

Preview

Description

How to build a search bar/form.

Difficulty

Medium

Time

30 Minutes.

Step 1: Set It Up - Create Search Results Page

Create a search results page in the Divi Theme Builder by adding the Archive Loop module.

1.) Create a search results page in the Divi Theme Builder by adding the Archive Loop module.

Step 2: Set It Up - Add Search Post Module

Add the Search Post module to the page of your choice.

1.) Add the Search Post module.

Step 3: Customize Settings - Archive Loop Module Search Results Page

Assign the Post Type that you would like to search and the appropriate Custom Loop Layout. Make sure that "Is Main Loop" is enabled.

1.) Define the Post Type that you would like to search.

2.) Define the appropriate Custom Loop Layout.

3.) Make sure that "Is Main Loop" is enabled.

Step 4: Customize Settings - Search Posts Module Main Settings

Set up the Search Post module by defining the Post Type and enabling the "Submit to Archive page" button.

1.) Define the Post Type.

2.) Submit the form to the Archive Page.

Step 5: Customize Settings - Search Posts Module Filter Item

Create a new Search Text Filter Item.

1.) Add a new Filter Item.

2.) Give the Filter Item an Admin Name.

3.) Select "Search Text."

4.) Define the Post Type.

Step 6: Add Custom Code

No custom code here.

Step 7: Conclusion

To end off I suggest styling the button from Appearance > Customize > Buttons. Test your Search bar/form from the frontend.

More Support?

Please email us at [email protected] if you are unable to get Divi Machine working.


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.