-
AuthorPosts
-
October 26, 2014 at 2:27 pm #341130
Hi Guys!
Please can you tell me how to add a Google Font to the theme. I want to add PT Mono as my p font.
Thanks you very much indeed.
Regards,
Christian
October 27, 2014 at 10:15 am #341408Hi jaroljmek!
Thank you for using Enfold.
Please use this on functions.php:
add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['PT Mono'] = 'PT Mono'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['PT Mono'] = 'PT Mono'; return $fonts; }
Regards,
IsmaelOctober 27, 2014 at 11:13 am #341424Hi there!
Thanks for this. Can you please send me the path to the function.php file? I can’t find it. Also, can you tell me where in the file I should insert this code?
Thanks very much.
Regards,
Christian
October 27, 2014 at 4:07 pm #341561Changes to functions.php in a parent theme will typically be overwritten (lost) when you update your theme. To avoid this, you should set up a child-theme and make changes to that instead of the parent theme. You can download a ready-made child theme here – http://kriesi.at/documentation/enfold/downloads/
The mods have also made a video available on this page – http://kriesi.at/documentation/enfold/videos/
Once you’re working with a child theme, in the admin area select Appearance > Editor, then click on Theme Functions (functions.php).
Dropping code into your functions.php has the potential to take your whole site offline. If that happens you’ll almost certainly need to have file access in order to resolve the problem. If you’re not familiar with using functions.php please ensure your site is fully backed up beforehand, and if at all possible test this out on a Staging/test site.
October 28, 2014 at 3:54 am #341951Hi!
@jaroljmek: The functions.php file is located on Appearance > Editor > Theme Functions (functions.php).Best regards,
IsmaelOctober 31, 2014 at 1:11 am #343816Is there an easier, safer way to add a Google font?
October 31, 2014 at 1:19 am #343821also it seems all the fonts come out BOLD. I want to make H3 Not bold– and all fonts for that matter.
November 2, 2014 at 8:37 am #344818Hey!
You can use a child theme to make changes to your site.
Here’s a link to download a starter child theme:
http://bit.ly/enfold-childWith regards to removing bold styles apply the CSS property
font-style: normal
to any required element. Use!important
if required.Cheers!
Arvish -
AuthorPosts
- You must be logged in to reply to this topic.