# 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.

- Type: PHP
- Runs: Run everywhere
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: bricks, fonts, privacy, performance
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/bricks-disable-google-fonts/

## Code

```php
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 use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Stop Bricks From Loading Google Fonts" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
