• Resolved audunmb

    (@audunmb)


    Twentig seems to add fonts to my theme, but I don’t want them and can’t remove them (they get added again if I remove them from theme.json). And they are loaded from Google somehow, despite having said that I should load fonts locally.

    How do I remove them?

Viewing 1 replies (of 1 total)
  • Plugin Support Yann

    (@collet)

    If you’d like to remove the Google Fonts added by Twentig, you can accomplish this by adding the following PHP code into the functions.php file of your child theme. (This code also includes the solution provided in your previous thread https://www.ads-software.com/support/topic/twentig-overrides-child-theme-theme-json/):

    function child_theme_support() {
    	add_filter( 'twentig_curated_google_fonts', '__return_empty_array' );
    	remove_filter( 'wp_theme_json_data_theme', 'twentig_filter_theme_json_theme' );
    	remove_action( 'wp_enqueue_scripts', 'twentig_twentytwo_enqueue_scripts', 12 );
    }
    add_action( 'after_setup_theme', 'child_theme_support', 20 );

    Hope that helps,
    Yann

Viewing 1 replies (of 1 total)
  • The topic ‘Fonts added by Twentig can’t be disabled’ is closed to new replies.