Ultimate Member Email – Change Background Color

Ultimate Member sends email to users based on various events. But here’s the thing: you might have noticed that all those emails have a pretty standard white background (#FFFFFF).

Almost every feature of emails sent by Ultimate Member can be customized. The only drawback is that those emails don’t have simple built-in settings to change the background color. But relax, it’s not as difficult as it seems!

To change the background color of emails sent to Ultimate Members, you will need to use custom coding. You can use um_email_template_body_attrs hook to customize HTML attributes.

Set Email Background Color to Black

Here is a snippet that will set the email background color to black or #000000. You can change the HEX color code according to your need.

add_filter( 'um_email_template_body_attrs', 'um_email_template_body_attrs', 10, 3 );
function um_email_template_body_attrs( $body_atts, $slug, $args ) {
	$body_atts = 'style="background: #000000;"';
 	return $body_atts;

Where to Add this Code

You can either add it to your child theme’s functions.php file or opt for a user-friendly plugin such as Code Snippets to activate the custom code.

Scroll to Top