Filter the Divi Module Custom CSS Fields

Written by Dan Mossop

The Divi theme developer documentation describes how to control the Custom CSS Fields for a module's settings.

There's a built-in filter for modifying these fields, which you can use like so:

add_filter("{$slug}_custom_css_fields", "edit_custom_css_fields", 10, 3);

function edit_custom_css_fields($custom_css_fields, $slug, $main_css_element) {
	return $custom_css_fields;
}

We may earn a commission when you visit links on our website.

Do More with Divi Dynamic Content!

Take full advantage of Divi's flexibility with the Divi Dynamic Content Extended plugin, perfect for enhancing your site by accessing more module fields. Benefit from advanced features like integration with ACF, Meta Box, and Pods settings pages, making your site smarter and more efficient.

Latest Posts

Customize the Lightbox Image Background Color in the Divi Gallery

Control the color that appears behind your images when users open in the gallery lightbox, including support for semi-transparent hues. This helps improve contrast for transparent images, align the experience with your brand palette, and create a more polished viewing...

Style the Divi Gallery Lightbox Close Button

Give your gallery lightbox a clear, on-brand close button by customizing its color and size. This improves visibility and usability against varying image backgrounds and ensures the button renders at full opacity for a consistent experience. In this guide we show you...

Add a Visible Shadow to Divi Gallery Lightbox Arrows

Give the lightbox navigation arrows in your Divi galleries a stylish pop and improve their visibility by adding a shadow beneath the arrows. This quick guide will show you how to make your navigation arrows stand out against the lightbox overlay.Add a Visible Shadow...

Adjust Lightbox Arrow Size in Divi Gallery

Customize the size of the navigation arrows that appear in your gallery lightbox so they’re easier to see and aligned with your site’s design. Whether you want larger, more accessible controls or a subtler look, setting a precise arrow size creates a more polished...

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

0 Comments

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

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