首页 > 代码库 > 别让Open Sans字体拖慢wordpress后台速度
别让Open Sans字体拖慢wordpress后台速度
最近打开wordpress后台是不是很慢?国内GG登不上了?这两者有没什么直接的联系?没错,WordPress后台是自动加载的谷歌Open Sans字体,据说gg服务器已经迁移到阿嘛丽可,需要一些小手段才能访问。既然如此,那就把Open Sans字体屏蔽了吧。
将如下代码复制到主题文件function.php
?
1 2 3 4 5 6 7 8 9 10 11 12 13 | //禁用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‘ ); |
保存,上传,刷新一下,是不是能以正常速度打开了?
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。