Remove Google Fonts from Wordpress

1.8k Views Asked by At

In source of website I see this code:

<link href='//fonts.googleapis.com/css?family=Poppins:400,400italic,500italic,500' rel='stylesheet' type='text/css'><link href='//fonts.googleapis.com/css?family=Poppins:400,400italic,500' rel='stylesheet' type='text/css'> <style type="text/css">.

It doesn't have ID so I can't remove it from functions.php

Steps I have done to remove it:

  1. installed plugin Disable/Remove Google Fonts, but it not helped

  2. In functions.php added this function:

     add_filter( 'style_loader_src', function($href){ if ((strpos($href, "//fonts.googleapis.com/") === false) || !is_page(31765)) { return $href;} return false;});
    

but still nothing changed.

  1. disabled all plugins, changed theme to different one, but still nothing.

I really need to remove them because it adds 1 second delay to website.

What can you suggest to remove it completely? (I use local custom fonts)

0

There are 0 best solutions below