How To Search Custom Post Types In Divi And Create A Search Results Pages Tutorial by Pee Aye Creative

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

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.

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!

6
Last updated Jan 3, 2021 @ 12:07 pm

Please share this post!

Nelson Lee Miller (aka The Divi Teacher)

Nelson is the owner of Pee-Aye Creative Co in the beautiful state of Pennsylvania. He loves helping small businesses, exploring, building websites with Divi, and teaching others.
Divi Adventure Club Product And Course Membership by Pee Aye Creative

Become A Member!

Gain access to everything we offer!

Learn More

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy

7 Comments

  1. 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

    Reply
    • Nelson Lee Miller (aka The Divi Teacher)

      Hi Thomas, I haven’t tested it, but do you mean you can’t use a shop module on the Search Results template at all? Or just with this plugin?

      Reply
      • Thomas

        The shop module was not working on my results page built with the theme builder and your plugin…. Now i deactivated relevanssi and i think it has to do something with it…
        The Problem is: I dont like the quality of the search from wordpress. How would you enhance the search. Which plugins do you use for a woo commerce shop built with divi. I would pay for a good solution which i could use for any shop built with woo and divi theme builder and divi theme.

        Thx a lot

        Br, Thomas

      • Nelson Lee Miller (aka The Divi Teacher)

        I’m not sure, I haven’t looked into it much but I will be soon.

        By the way, this isn’t my plugin, it’s just a free one in the repository.

  2. 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?

    Reply

Submit a Comment

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

Asset 7

Shop Our Divi Products

Plugins • Courses • Templates

Visit The Shop

Divi Adventure Club Product And Course Membership by Pee Aye Creative

Become A Member!

Gain access to everything we offer!

Learn More

Divi Tutorials On YouTube

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

Visit Our Channel

Recent Posts

How To Properly Update Divi

How To Properly Update Divi

In this tutorial, I am going to explain how to properly update Divi by listing the most important steps to take to ensure peace of mind.

Pin It on Pinterest

0

Your Cart