六月初,google被ZF墙的更加严重了,连字体也不让加载了,别说勾诶间特了。。。导致博客很难打开,所以屏蔽先!

第一种方法:下载 Remove Open Sans font Link from WP插件,在后台启用。

下载地址:http://downloads.wordpress.org/plugin/remove-open-sans-font-from-wp-core.zip

 

第二种是:

删除主题中的 funcitons.php 文件中的:

function twentyfourteen_font_url() {
	$font_url = '';
	/*
	 * Translators: If there are characters in your language that are not supported
	 * by Lato, translate this to 'off'. Do not translate into your own language.
	 */
	if ( 'off' !== _x( 'on', 'Lato font: on or off', 'twentyfourteen' ) ) {
		$font_url = add_query_arg( 'family', urlencode( 'Lato:300,400,700,900,300italic,400italic,700italic' ), "//fonts.googleapis.com/css" );
	}

	return $font_url;
}

然后删除wp-includes文件中的script-loader.php:

$open_sans_font_url = "//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets";

然后刷新是不是就OK?

  1. 大神,我用了你的方法2,就出现了这个错误,求解
    Fatal error: Call to undefined function twentyfourteen_font_url() in D:\xampp\htdocs\dfy\wp-content\themes\twentyfourteen\functions.php on line 83

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="">

请选择吧!