Any Custom Post Type Now Shows In The Divi Blog Module
We’ve tested this with a variety of different post types, and it works great. We even tried the project post type that ships with Divi, as well as products from WooCommerce. Of course there are some disadvantages to using the Blog Module to display products, but hey, it could be useful. Here are the custom post types we tested with the Divi blog module:
Once this plugin is installed and activated, a new menu item appears in your Dashboard called “CPT UI.” From there, you can add or edit post types. I’m not going to show you all the steps here in this tutorial (we’ll save that for another time if you are interested), but we can show you the basics. Our goal in this post is simply to show you how to display custom post types in the Divi Blog module, not to create and manage them.
Below you can see the settings to add a new post type.This is what I used for our demo. I decided to use “Cats” as my custom post type.
After the custom post type is created and a few items have been added, go to the page where you want to display the post type feed and add a blog module. As of Divi 4.0, a new option appears under the Content toggle called “Post Type.” This is a dropdown showing all the available post types for this website. As you can see, from our example, there are several available in my example site:
- Posts (which was the only one we had previously),
- Products (since I have WooCommerce installed)
- Cats (the new CPT we just created)
When I click the Cats from the post type selector, it displays everything in the Divi blog module just like it did for posts prior to Divi 4.0. You can choose the layout, hide or show elements, and style everything using the Divi Builder.
I’ really excited about this and some of the other new features in Divi, so be sure to follow the blog closely as I will be showcasing more and more features that you may have missed. We will also be creating some child themes using custom post types, so that is excited that this functionality has been added. Let us know in the comments how you are using custom post types in the Divi blog module!