NEW: You Can Now Display Custom Post Types In The Divi Blog Module
For those of you who are not deep into Divi every day like me and perhaps do not read every changelog, I have some incredible news for you! As of Divi 4.0, you can now show custom post types in the Divi Blog module, and it couldn’t be easier!
In this written tutorial and video, I am going to show you what all is possible now that custom post types work in the Divi Blog Module. The cool part is that it works with any CPT, not just blog posts. You can use it for anything from Projects to Products to Pages and anything custom that you create!
▶️ Please watch the video above to get all the exciting details! 👆
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:
- Posts
- Pages
- Projects
- Products
- Custom
Create and Display A New Custom Post Type In The Divi Blog Module
For this tutorial, we could do multiple things to show you how it works, but we decided instead of showing you how to add projects or pages, we would go a step further and use a new custom post type for our demo example.
So to get started, I’m going to use a plugin called “Custom Post Type UI” to create the custom post type. You are welcome to use other plugins or code this yourself, but I thought this plugin was the best one for most of my readers.
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),
- Pages
- Media
- Projects
- 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!
Great post.Thank you. I do not read the divi change log (yet) – so it is great that you post about changes and new features in DIVI, Miller. I am experimenting with use Custom Post types on one of my projects.
You’re welcome Jacob, glad you enjoyed this and I hope you have fun using it!