Subscribe On YouTube

Join other subscribers and enjoy other Divi video tutorials!

How To Search Custom Post Types In Divi And Create A Search Results Pages

Nelson Miller Profile Orange
This tutorial will show you how to search for custom post types in Divi as well as how to set up a custom search results page with the Divi Theme Builder.

▶️ Please watch the video above to get all the exciting details! 👆

Create A Custom Post Type Search Bar In Divi

Custom Post Types

If you are using our FREE Custom Post Type Generator, or if you have custom post types on your Divi website, then you probably should provide a way for users to search your content.

To learn more about custom post types, be sure to check out our full guide here: How To Create And Use Custom Post Types In Divi

Using A Custom Divi Search Bar 

The default Divi Search module is only compatible with Pages and Posts, so it will not work for custom post types. Thankfully, a friend of mine Jerry Simmons has created a Divi plugin that extends the search module for use with custom post types.

For the actual search bar we are using Post Type Search Module for Divi plugin which adds a custom module to limit the search results to the post type of your choice.

Once you have this plugin installed and active, you will see a new module in your Divi Builder called “Post Type Search.” Go ahead and add that module to your layout.

custom post type search module for Divi

This module is very similar to the default Divi Search module, but it has a few extra features that are very important. Notice that you can select which post types you want the search to apply to. This is very handy. I suggest creating separate search bars for each post type on your website.

choose which post types to display in the Divi search results

Adjusting The Module Design Style

We have another tutorial on How To Customize And Style The Divi Search Module. Instead of repeating everything, just go ahead and reference that tutorial for how to style this custom post type search module. It’s exactly the same, it just has a different name and a few extra features.

How To Customize And Style The Divi Search Module Tutorial by Pee Aye Creative
Add new template in the Theme Builder for the custom post type search results page
Assign template to the custom post type search results pages

Then click the blue button at the bottom of the popup that says “Create Template.”

Add custom body to the Divi Theme Builder custom post type search results template

Next, click on “Add Custom Body.”

This will bring up a new popup again. In that popup, click on “Build Custom Body.”

show Divi custom post type search results in a Theme Builder template with the blog module

You can use any layout or design style you want, just remember that this layout is for search results. So any time someone enters a search term in one of the search bars, this will be the layout they see. I suggest adding a text module and use dynamic content for the “Archive/Page Title” and anything else you want to use!

Subscribe For More Things Like This!

At the start of each month, we send out a recap newsletter from the month before with family news, Divi news, our latest tutorials, and product news. Occasionally, if the news is too exciting to wait, we will send out another email separate from the monthly newsletter. That’s what you get when you subscribe, and of course you can unsubscribe if you are no longer interested!

Blog Post Optin
Divi Logo (2)

Shop Our Divi Products

Plugins • Courses • Templates

Visit The Shop

Featured Products

Asset 4

New! Trail Guides

Follow a series of blog posts carefully arranged around a specific topic or goal! Keep track of your progress by marking posts completed, just like a free course!

View Trial Guides

Divi Trail Committee Membership badge with map design

Join The Trail Committee!

Show support for our ongoing work creating community resources at Pee-Aye Creative and enjoy exclusive member perks in return.

Learn More

Divi Tutorials On YouTube

Our videos have views! Join subscribers and enjoy over video tutorials!

Visit Our Channel

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy


Comments By Others

  1. Robert Nitrio

    Thanks for sharing this great solution. The plugin seems to be working well, despite the warning that it has not been updated for some time. That said, I cannot get the space separation between the input field and the button that you did. They are butted up against one another. I tried several things with no success.

    I also would like to reduce the height of the search bar. I have not found a way to do so, but this isn’t critical.

    • Hemant Gaba

      Hi Robert!

      Thanks for letting us know. We will update the plugin version. Also, can you please share the page URL to check the height of the search bar?

  2. Stefanie Bayer

    Hi there – Is there a way to get the search results correctly filtered by all the post types I want also when leveraging the standard search icon in my menu? I made it work with a template, the search module and the blog module. But the user would have to press the search button inside my results page to get more post types than just posts and pages which is ootb.
    I also tried modifying the functions.php according to various posts out there which didn’t have any effect at all… E.g. this post:

    My goal is that the user clicks on the search icon in the menu, enters the search term and the sees the correct results (posts, pages and a custom post type called “downloads”).

    Thanks for your advice 🙂

  3. Kelli

    Just curious if you have any other free plugin suggestions to fix the search issue? The one mentioned “Post Type Search Module For Divi” is out of date with the latest version of Divi and looks like the plugin hasn’t been updated in 2 years.


  4. S Joblin

    Not sure if you can help me but when i search for issues with Divi your name comes up a lot and your problem solving has helped me immensely. Thank you!!! On the issue of search and the search results page I am finding that when there is a page in the search results it is displaying the date. Im happy for the date to be displayed on the results for my posts but not my pages and i cant figure out if I can somehow get Divi to differentiate between the two, only on the search results page.

    • Hemant Gaba

      Hi Joblin!

      Please try adding the following code in Theme options for it:

      .search-results .type-page span.published {
      display: none;

      Let me know how it goes!

  5. Ally

    Thanks as always for awesome posts. You save my butt often!

    Do you know if your buddy is going to update that search plugin? Or do you recommend something different that is compatible with the lasted DIVI theme?

    THank you!

      • Ally Drez

        Hey boss! Has that search helper ever come out? I searched to buy it, but don’t see it listed. Thank you!

      • Ernst <span class="comment-author-role-label"><a href="" class="comment-author-role-link" rel="external nofollow" target="_blank">Divi Adventure Club Member</a></span>

        Can’t wait.
        I really hope it will be able to show the type of search result you’re getting.

        For example; when searching for: ‘design’. I would love to be able to show on the results page the type of search result that is shown i.e. if it’s a page, or a post, or news, or a document/media item.

        I’ve been searching the internet for that, but haven’t really been able to find a solution.

      • Mat Tat

        This is good to know…I need it too. Sooo important to be able to search events. Help!

  6. Philip

    Hi, I just wondering if there’s an option for search results to be in a specific category of a custom post type. For example, my custom post type is Food and I have several categories under it like Breakfast, Lunch, Dinner. And if I have a page of all my custom post types under the category of Breakfast, I want my seach button to filter all the results under that specific category. That is possible with the default seach module of Divi but not with this one. Hope you can help me. Thank you.

  7. Leslee Langlands

    Is this the same as the search on your support page? That is exactly what I have been looking for, for my CPT search.

  8. Jerry

    Thank you so much for the tutorial!
    Is it possible to set the search results to “All Posts” rather than default 10 posts?

    • Jerry

      Never mind, I found that if I set the Posts For Current Page -> Post Count = 9999 which is more than enough. Thank you for everything!

  9. mike

    Hello I was wondering if you could help me add a search icon to the button of the search bar of the custom post type search plugin. I have tried to add css to the advanced tab in the module with no luck.. my client really wants that little magnifying glass icon :))
    here is a link

    thanks so much

    • Hemant Gaba

      Could you please use this code and see if that helps?

      jQuery("form.et_pb_searchform .et_pb_searchsubmit").val("");

      form.et_pb_searchform div{
      position: relative;
      form.et_pb_searchform div:after{
      content: "\55";
      position: absolute;
      color: #fff !important;
      right: 0px;
      font-family: ETMODULES;
      font-weight: bold;
      font-size: 26px;
      top: 50%;
      transform: translateY(-50%);
      z-index: 1;
      background-color: #0B297F !important;
      height: 100%;
      padding: 0 0.4em;
      form.et_pb_searchform .et_pb_searchsubmit{
      z-index: 2;
      background-color: transparent !important;
      min-width: 40px;

  10. Mike

    Can you please advise me on how to add a magnify glass search icon to the button of this plugin. I am trying to do so with the advanced tab in the button area but I am not having success with the CSS

  11. Nigel M

    I need multiple search results templates for different post types. Divi has only one template. Any idea how I can get around this?

  12. Thomas

    Hi, i am just testing your plugin and i am wondering if the search results page is also working with the divi shop module… It is just not working on my test environment. Is there something i have to do additionally to get it work with products. With the Blog Module it seems to work, but i need the shop module.

    BR, Thomas


Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Posts


Your Cart