Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove Google Fonts from Divi
<?php
function wpse_dequeue_google_fonts() {
wp_dequeue_style( 'divi-fonts' );
}
add_action( 'wp_enqueue_scripts', 'wpse_dequeue_google_fonts', 20 );
@stansbelv

This comment has been minimized.

stansbelv commented Jan 30, 2017

Hi, seems that it's not working. Did you test it?

@KostasRodolakis

This comment has been minimized.

KostasRodolakis commented Mar 20, 2017

Worked perfectly! Thanks.
One should write the function (without the <?php part) inside his child theme's functions.php file.

@tigredanky

This comment has been minimized.

tigredanky commented Jun 16, 2017

Hmmm, tried it and no luck.

@dtbaker

This comment has been minimized.

dtbaker commented Jun 28, 2017

Another option is this:


add_action('init',function(){
	global $l10n;
	if(!empty($l10n['Divi'])){
		$l10n['Divi']->add_entry(array(
			'context' => 'Open Sans font: on or off',
			'singular' => 'on',
			'translations' => array(
				'off',
			)
		));
	}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment