Stop Bricks From Loading Google Fonts
Turns on Bricks' "Disable Google Fonts" setting from code, so neither the builder nor the front end requests fonts from Google.
Opens WPIDE on
Code
add_filter( 'option_bricks_global_settings', function ( $settings ) {
if ( is_array( $settings ) ) {
$settings['disableGoogleFonts'] = true;
}
return $settings;
} );
Notes
Upload the fonts you need under Bricks > Custom Fonts so headings keep their typeface.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.