Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Last active January 20, 2023 18:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/22d1a44f356350ec4cb0c481df6d512a to your computer and use it in GitHub Desktop.
Save KaineLabs/22d1a44f356350ec4cb0c481df6d512a to your computer and use it in GitHub Desktop.
Remove Youzer Google Fonts
<?php
/**
* Remove Youzer Google Fonts.
*/
function yzc_remove_google_fonts() {
wp_dequeue_style( 'yz-opensans' );
wp_deregister_style( 'yz-opensans' );
}
add_action( 'wp_enqueue_scripts' , 'yzc_remove_google_fonts', 999 );
@b0br2019
Copy link

b0br2019 commented Oct 4, 2020

to actually remove the woff files from being loaded you should change code to include this?

wp_deregister_style

e.g.

function yzc_remove_google_fonts() {
    wp_dequeue_style( 'yz-opensans' );
    wp_deregister_style('yz-opensans');

@KaineLabs
Copy link
Author

wp_deregister_style

Done i updated the snippet, thank you so much for reporting this :)

Stay safe and have a great week!

@SuiteCom
Copy link

FYI the style name is now youzify-opensans. By replacing yz-opensans with it in the given function, Google Fonts are removed.

(Using Youzify v3.3.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment