Home » Tutorial » How to Remove MailPoet CSS

How to Remove MailPoet CSS

MailPoet

MailPoet is a free email newsletter plugin for WordPress. It is a powerful email marketing software for WordPress users and bloggers. It comes with deep integration with WordPress as a plugin and great email delivery rates comparable to those of other email marketing software.

I am using this plugin for some of my projects. But I couldn’t tolerate the CSS file it added.

MailPoet adds mailpoet_public.css file. If you want to remove or dequeue this style sheet, add the following code to your theme’s functions.php file:

add_filter('print_styles_array', 'custom_print_styles_array');
function custom_print_styles_array($styles){
	$styles_to_remove = array('mailpoet_public');
	if(is_array($styles) && count($styles) > 0){
		foreach($styles as $key => $code){
			if(in_array($code, $styles_to_remove)){
				unset($styles[$key]);
			}
		}
	}
	return $styles;
}

Bonus:

Remove Google fonts added by MailPoet

After installing MailPoet, you will notice that it adds some Google fonts. I suggest you remove those fonts. To do so, paste the following code into your theme’s functions.php file:

add_filter('mailpoet_display_custom_fonts', function () {return false;});

Comment below to let me know if this solution helps.

Read more from Tutorial

Written by:

Morshed Alam
A teacher by profession, a traveler by passion and a netizen by choice.

Have you written on ThoughtMight?Write Today



Leave a Comment

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