Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GeneratePress: Remove all Google Fonts loading and options.
<?php
/**
* GeneratePress: Remove all Google Fonts loading and options.
*
* @link https://gist.github.com/cliffordp/640ff4586c9a7c9ffe6656ff65326a5e This snippet.
* @link https://share.getcloudapp.com/NQuDXKJm 1min demo that this code works.
* @link https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/?aid=5336&affiliate_key=Lsvk04DjJOhq I'm using Toolset to add custom snippets.
*/
toolset_snippet_security_check() or die( 'Direct access is not allowed' );
// Put the code of your snippet below this comment.
add_filter( 'generate_typography_google_fonts', '__return_empty_string', 100 ); // Must be greater than 50.
add_filter( 'generate_google_fonts_array', '__return_empty_array' );
add_filter( 'generate_typography_customize_list', '__return_empty_array' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.