在我的WordPress主题的<head></head>
之间是谷歌字体样式表的断开链接。如何删除链接或更改链接?在index.php
只显示wp_head()
。
<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' />
这是网址:
答案 0 :(得分:2)
样式表将使用wp_register_style
加载,可能在functions.php
答案 1 :(得分:0)
取消注册/出列样式是最佳做法
https://codex.wordpress.org/Function_Reference/wp_deregister_style https://codex.wordpress.org/Function_Reference/wp_dequeue_style
但您也可以使用此过滤器来过滤掉任何条件的样式:
add_filter( 'style_loader_src', function($href){
if(strpos($href, "name-of-allowed.css") !== false) {
return $href;
}
return false;
});