从 WordPress 中删除 Google 字体
In source of website I see this code:
<link href='//fonts.googleapis.com/css?family=Poppins:400,400italic,500italic,500' rel='stylesheet' type='text/css'><link href='//fonts.googleapis.com/css?family=Poppins:400,400italic,500' rel='stylesheet' type='text/css'> <style type="text/css">.
It doesn't have ID so I can't remove it from functions.php
Steps I have done to remove it:
installed plugin Disable/Remove Google Fonts, but it not helped< /p>
In functions.php added this function:
add_filter('style_loader_src',function($ href){if(((strepos($ href,“ //fonts.googleapis.com/” {返回$ href;}返回false;});
but still nothing changed.
- 禁用所有插件,将主题更改为不同的插件,但仍然没有。
我真的需要删除它们,因为它在网站上增加了1秒的延迟。
您可以建议什么完全删除它? (我使用本地自定义字体)
In source of website I see this code:
<link href='//fonts.googleapis.com/css?family=Poppins:400,400italic,500italic,500' rel='stylesheet' type='text/css'><link href='//fonts.googleapis.com/css?family=Poppins:400,400italic,500' rel='stylesheet' type='text/css'> <style type="text/css">.
It doesn't have ID so I can't remove it from functions.php
Steps I have done to remove it:
installed plugin Disable/Remove Google Fonts, but it not helped
In functions.php added this function:
add_filter( 'style_loader_src', function($href){ if ((strpos($href, "//fonts.googleapis.com/") === false) || !is_page(31765)) { return $href;} return false;});
but still nothing changed.
- disabled all plugins, changed theme to different one, but still nothing.
I really need to remove them because it adds 1 second delay to website.
What can you suggest to remove it completely? (I use local custom fonts)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论