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?
Try to put your font name inside
" "
as well as include all types of your font for browser compatibility:It sounds like your theme is using the wp_head action hook to set the CSS rules using the theme's options. You can try to clear the default font setting in your theme's options panel and instead, add the CSS rules to the theme's style.css file directly. The style.css is located in the root of your active theme's directory.
style.css file:
If that does not work, you could try to set an explicit override in the style.css file for your navigation element.
Example:
Either way, try to avoid inserting CSS directly into the header tags. By WordPress standards, it is bad practice and not recommended, and helps to avoid the types of problems you are having now.
"I need to remove only the font part of wp_head()"
Finding and removing the the part that adds the css using the wp_head hook is more complicated.
You will need to locate the the action hook that is using wp_head() to insert the CSS rules in the page and then comment out, or remove that portion of the code. The first place to look would be in the functions.php file.
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.