Skip to content

Divi Custom Post Types Default CSS

Matt Knighton·Aug 2018·6 min read
Divi Custom Post Types Default CSS

Elegant Themes recently provided an update for Divi Custom Post Type support. When I first heard about it I was really pretty happy about it.

We have heaps of sites using Divi custom post types. We have all sorts of single post pages and CSS that helps us do that and the thought of less custom code made me happy.

The update meant, in theory at least, we can dump a bunch of custom code and depend on Default Divi for solutions with custom post types. The theory is unfortunately not that practical.

A Flaw in the Implementation of Divi Custom Post Type CSS

Unfortunately, when we updated to version 3.11.1 we found a minor disaster had occurred. The team at elegant themes had generated a gem of a style sheet filled with important statements and other wonderful gifts of poor CSS. This is injected by default on all of our custom post type pages. I was far from impressed and started to hunt around on what to do.

I looked at first trying to find out why I had so much funk in my pages. All new CSS rules and weird padding was making my head spin and then I identified a simple solution. Either roll back or remove this style sheet.

The good thing is this style sheet is linked to a single action that can be easily updated.

The New Action for Divi Custom Post Type CSS

In the Divi Theme, a new custom post type hook was added with an action to link some CSS. This is a completely new style sheet taking the best and worst of the existing Divi Stylesheet with some additional sugar to “help” with your custom post types.

Unfortunately for me, it turned my pages into spaced our weird padding items so I had one simple solution, remove that style sheet.

Fortunately, that is not too hard.

I placed the following gist in my child theme function file and everything was well in the world again.

If you are finding issues with this new Divi custom post type support, give this code a whirl and see if it helps you get some normal back into your sites.

How Does this Reflect on Elegant Themes?

The team at Elegant Themes are racing ahead on changes, and that is fantastic most of the time. However, they don’t have a beta developer group. They also don’t have a way of testing new functions before the rollout of major updates. This means you need to keep a close eye on your updates and have a testing process. This was a critical step for the Divi Custom Post Type support feature.

We found that overall we need to be careful on all Divi updates. Often things break in a catastrophic way so be sure to get yourself a good support team on your commercial sites.

It would be great if Elegant Themes had a beta plugin that allowed new features to be enabled or disabled before being merged into the Divi Theme.

How did your site go with these updates?

If you want access to other cool plugins and free tools for your Divi Powered Website, become a free member of Divi Framework.

More Articles & Insights

View all articles ↗
How to Display Multiple Sidebars with Kadence Elements
Mar 2025 · WordPress & AI

How to Display Multiple Sidebars with Kadence Elements

Read Article
Fixing WordPress Emoji Saving Issues with ChatGPT Output
Mar 2025 · WordPress & AI

Fixing WordPress Emoji Saving Issues with ChatGPT Output

Read Article
Why Every WordPress Developer Should Use PHPCS and WordPress Coding Standards
Nov 2024 · WordPress & AI

Why Every WordPress Developer Should Use PHPCS and WordPress Coding Standards

Read Article

Let’s figure it out together

You don’t have to build alone.

A little guidance. A good conversation. A better next step.

Work with me

Start with a 20-minute call. I read every enquiry myself.