• Resolved worttaenzer

    (@worttaenzer)


    Hello,

    due to the new GDPR law coming this month I’m not allowed to have a connection to Google Fonts anymore. That’s why I tried to switch off the Google Fonts in the theme to host the font myself and just add some css snippet to link to the hosted font files.

    In the “functions.php” of this theme I found a small description on how to do that. It told me to put this snippet into the functions.php of my child theme.

    function mytheme_dequeue_fonts() {
    wp_dequeue_style( 'ephemeris-fonts' );
    }
    add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 );

    I did that. To check if the Google Font Connection is actually gone, I visited my website. When I right click “Show Source Code” it does not show the google font link connection anymore BUT it still shows me the Open Sans as my Font on my website, even though I have NOT connected it with the self hosted font files yet.
    So I am wondering, where the website is getting the connection to the Google Font from? Did I miss something? Do I still need to change something in the functions.php? I wanna make sure the connection to Google is gone, before I host the font myself.

    I hope you can help me with that.
    Thanks.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Theme Author Anthony Hortin

    (@ahortin)

    The CSS will continue to reference the original Google Font Name, but if you’re no longer enqueuing the Google Fonts, then the browser will simply use the fallback fonts instead.

    For example, the main site headings (h1..h6) use the following font-family

    
    font-family: 'Dosis', sans-serif;
    

    If your site is no longer loading the ‘Dosis’ font from Google, then the browser will automatically fallback to using the default ‘sans-serif’ font instead.

Viewing 1 replies (of 1 total)
  • The topic ‘Delete Google Fonts connection’ is closed to new replies.