0
votes

Inbetween the <head></head> of my WordPress theme is a broken link to a google font stylesheet. How do I either remove the link or change it? In the index.php it's just showing wp_head().

<link rel='stylesheet' id='tesseract-fonts-css' href='//fonts.googleapis.com/css?family=Open%2BSans%3A400%2C‌​300%2C300italic%2C40‌​0italic%2C600%2C600i‌​talic%2C700%2C700ita‌​lic%2C800%2C800itali‌​c%26subset%3Dlatin%2‌​Cgreek%2Cgreek-ext%2‌​Cvietnamese%2Ccyrill‌​ic-ext%2Ccyrillic%2C‌​latin-ext' type='text/css' media='all' />

This is the URL:

http://fonts.googleapis.com/css?family=Open%2BSans%3A400%2C‌​300%2C300italic%2C40‌​0italic%2C600%2C600i‌​talic%2C700%2C700ita‌​lic%2C800%2C800itali‌​c%26subset%3Dlatin%2‌​Cgreek%2Cgreek-ext%2‌​Cvietnamese%2Ccyrill‌​ic-ext%2Ccyrillic%2C‌​latin-ext

2
Could you specify the url of the link to the google font stylesheet that you consider as broken?blackpen
As soon as I get home, I'll paste it.Austin Peck
<link rel='stylesheet' id='tesseract-fonts-css' href='//fonts.googleapis.com/css?family=Open%2BSans%3A400%2C300%2C300italic%2C400italic%2C600%2C600italic%2C700%2C700italic%2C800%2C800italic%26subset%3Dlatin%2Cgreek%2Cgreek-ext%2Cvietnamese%2Ccyrillic-ext%2Ccyrillic%2Clatin-ext' type='text/css' media='all' />Austin Peck

2 Answers

2
votes

The stylesheet will be loaded using wp_register_style probably in the functions.php

0
votes

Deregister/Dequeue styles is best practice

https://codex.wordpress.org/Function_Reference/wp_deregister_style https://codex.wordpress.org/Function_Reference/wp_dequeue_style

But you can use this filter too, to filter out styles with any condition:

add_filter( 'style_loader_src', function($href){
if(strpos($href, "name-of-allowed.css") !== false) {
return $href;
}
return false;
});