WordPress怎么禁止古腾堡加载Google谷歌字体

追格官方小助手/ 2022年02月21日/ WordPress/ 浏览 1360

WordPress古腾堡编辑器加载了谷歌字体,导致无法访问谷歌的资源,那么问题来了,怎么禁止加载谷歌字体呢?


解决方法:


将以下代码添加至当前使用的WordPress主题的functions.php即可:


add_action('admin_print_styles', function(){
wp_deregister_style('wp-editor-font');
wp_register_style('wp-editor-font', '');
});


发表评论

暂无评论,抢个沙发...

客服 工单