如何编辑wp_head()覆盖默认fontin wordpress? [英] how to edit wp_head() to overwrite the default fontin wordpress?

查看:909
本文介绍了如何编辑wp_head()覆盖默认fontin wordpress?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用@ font-face更改默认字体。但导航菜单的字体不会改变。它没有超过写默认字体。如果我删除wp-head()它的工作正常。但我需要wp-head()。只有默认字体必须从wp_head()中删除?

  @ font-face {
font-family:leb -webfont;
src:url(http://www.swaidanews.com/CMS/wp-content/uploads/fonts/leb.ttf);

}
body {font-family:leb-webfont!important;颜色:#333; font-size:16px;}
h1,h2,h3,h4,h5,h6,h7 {font-family:leb-webfont color:#000;}

也尝试过这个..

  .sf-menu> li> a {font-family:leb-webfont!important;} 

/ p>

如何编辑wp_head()并覆写预设字型?

解决方案

>一些研究后,我发现wp_head逻辑是在wp-includes / script-loader.php。



请注意,这是原始的更改,整个WP,所以当改变时非常谨慎。


i am using @font-face to change the default font. but the navigation menu fonts are not changing. its not over writing the default font. if I remove the wp-head() its works fine. but i need wp-head(). only the default fonts must be removed from wp_head()?

@font-face {
         font-family: leb-webfont;
         src: url(http://www.swaidanews.com/CMS/wp-content/uploads/fonts/leb.ttf);

}
body {font-family:"leb-webfont"!important; color:#333; font-size:16px;}
h1,h2,h3,h4,h5,h6,h7{font-family:"leb-webfont"!important; color:#000;}

Also tried this..

.sf-menu > li > a {font-family:"leb-webfont"!important;}

didn't worked.

how to edit wp_head() and overwrite the default font?

解决方案

After some research i found that wp_head logic is in wp-includes/script-loader.php.

Note that this is raw change and you could break your entire WP, so be very cautious when change there.

这篇关于如何编辑wp_head()覆盖默认fontin wordpress?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆