Filter the Divi Module Custom CSS Fields

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;
}

This post may contain referral links which may earn a commission for this site

Divi Booster

Hundreds of new features for Divi
in one easy-to-use plugin

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