最近打开wordpress后台是不是很慢?国内GG登不上了?这两者有没什么直接的联系?没错,WordPress后台是自动加载的谷歌Open Sans字体,据说gg服务器已经迁移到阿嘛丽可,需要一些小手段才能访问。既然如此,那就把Open Sans字体屏蔽了吧。
将如下代码复制到主题文件function.php
//禁用Open Sans字体
function remove_open_sans() {
wp_deregister_style( 'open-sans' );
wp_register_style( 'open-sans', false );
wp_enqueue_style('open-sans', '');
}
add_action( 'init', 'remove_open_sans' );
保存,上传,刷新一下,是不是能以正常速度打开了?