-
AuthorPosts
-
March 5, 2015 at 1:51 pm #406386
Hi,
Great theme.
I’d like to add custom font- is not listed as official Google fonts.
Thanks!March 5, 2015 at 6:13 pm #406565This reply has been marked as private.March 6, 2015 at 6:08 am #406812Hi!
You will have to import the font in your Quick CSS in Enfold–>General Styling. Please refer to this link to see how it’s done: http://www.w3schools.com/cssref/css3_pr_font-face_rule.asp
Regards,
RikardMarch 6, 2015 at 9:36 am #406881This reply has been marked as private.March 6, 2015 at 10:35 am #406903Hey!
Try adding this at the very end of your theme / child theme functions.php file:
function include_font() { ?> <style> @import url(https://fonts.googleapis.com/earlyaccess/opensanshebrew.css); body{ font-family: 'Open Sans Hebrew', serif; } </style> <?php } add_action('wp_head', 'include_font');
Cheers!
JosueMarch 6, 2015 at 11:58 am #406930This reply has been marked as private.March 6, 2015 at 6:45 pm #407190Hey!
Please remove the code from functions-enfold.php file and add it to Functions.php file that is inside wp-content/themes/enfold folder. You can also edit the file in Appearance > Editor
Best regards,
YigitMarch 10, 2015 at 6:56 pm #409011Hi!
Pulling the font files straight from Google works partly.
It works only on Firefox, not Explorer.. and only regular font, Header not working unfortunately.
Luckily I got a set of files which fix this issues. Can I use my own local files?
Already uploaded those to css folder.
Can you suggest a fix?Thanks!
March 10, 2015 at 7:07 pm #409017Hey!
Luckily I got a set of files which fix this issues. Can I use my own local files?
Are you referring to CSS files? you can use the following WordPress function to include them in your theme:
http://codex.wordpress.org/Function_Reference/wp_enqueue_styleBest regards,
JosueMarch 10, 2015 at 7:10 pm #409019Not sure how,
but got a few who already solved this issue with new set of files and css sheet.
Here’s the solution, just need the right code to paste:
===
Hia I’ve had the same issue, so I’ve created a new web version of this font which works great with IE. You can download it Here: http://assafk.com/staff/open_sans_hebrew/Opes_Sans_Hebrew_Fixed.rar Thanks! Assafafter you download the files in the rar, add this css to use it:
@font-face {
font-family: ‘Open Sans Hebrew’;
font-style: italic;
font-weight: 700;
src: url(opensanshebrew-bolditalic-webfont.eot);
src: url(opensanshebrew-bolditalic-webfont.eot?#iefix) format(’embedded-opentype’),
url(opensanshebrew-bolditalic-webfont.woff) format(‘woff’),
url(opensanshebrew-bolditalic-webfont.ttf) format(‘truetype’);
}
@font-face {
font-family: ‘Open Sans Hebrew’;
font-style: normal;
font-weight: 700;
src: url(opensanshebrew-bold-webfont.eot);
src: url(opensanshebrew-bold-webfont.eot?#iefix) format(’embedded-opentype’),
url(opensanshebrew-bold-webfont.woff) format(‘woff’),
url(opensanshebrew-bold-webfont.ttf) format(‘truetype’);
}
@font-face {
font-family: ‘Open Sans Hebrew’;
font-style: italic;
font-weight: 800;
src: url(opensanshebrew-extrabold-webfont.eot);
src: url(opensanshebrew-extrabold-webfont.eot?#iefix) format(’embedded-opentype’),
url(opensanshebrew-extrabold-webfont.woff) format(‘woff’),
url(opensanshebrew-extrabold-webfont.ttf) format(‘truetype’);
}
@font-face {
font-family: ‘Open Sans Hebrew’;
font-style: normal;
font-weight: 800;
src: url(opensanshebrew-extrabold-webfont.eot);
src: url(opensanshebrew-extrabold-webfont.eot?#iefix) format(’embedded-opentype’),
url(opensanshebrew-extrabold-webfont.woff) format(‘woff’),
url(opensanshebrew-extrabold-webfont.ttf) format(‘truetype’);
}OR
<link href=’http://fonts.googleapis.com/css?family=Open+Sans’ rel=’stylesheet’ type=’text/css’>
=== What method should I use?
March 10, 2015 at 7:12 pm #409023March 10, 2015 at 8:41 pm #409068All is now working with all browsers, but the headers.
Suggestions?
Thank you.March 10, 2015 at 9:06 pm #409086Hi,
Can you post the link to your website please?
Regards,
JosueMarch 10, 2015 at 9:08 pm #409089This reply has been marked as private.March 10, 2015 at 11:04 pm #409587Hey!
Add this at the very end of your theme / child theme functions.php file:
add_filter( 'avf_google_heading_font', 'avia_add_custom_font'); add_filter( 'avf_google_content_font', 'avia_add_custom_font'); function avia_add_custom_font($fonts) { $fonts['Open Sans Hebrew'] = 'Open Sans Hebrew'; return $fonts; }
That will enable Open Sans Hebrew in General Styling > Fonts so you can set the heading elements to that.
Cheers!
JosueMarch 10, 2015 at 11:07 pm #409588This reply has been marked as private.March 10, 2015 at 11:10 pm #409590This reply has been marked as private.March 11, 2015 at 12:17 am #409614Yeah that would work too, but i’d suggest leaving that in Quick CSS instead, to avoid overriding when the theme gets updated,
Cheers!
Josue -
AuthorPosts
- You must be logged in to reply to this topic.