Skip to content

Instantly share code, notes, and snippets.

@mkrdip
Last active January 13, 2021 13:32
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mkrdip/f165408f23e2c645161b to your computer and use it in GitHub Desktop.
Save mkrdip/f165408f23e2c645161b to your computer and use it in GitHub Desktop.
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
Copy link

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

@KostasRodolakis
Copy link

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

@tigredanky
Copy link

Hmmm, tried it and no luck.

@dtbaker
Copy link

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