-
AuthorPosts
-
May 31, 2015 at 6:35 pm #452267
I am trying to add additional Google Fonts to the Enfold font options.
I have added this to me Functions.php of my child theme:
add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Source Sans Pro’] = ‘Source Sans Pro:400,600,800’;
return $fonts;
}add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{
$fonts[‘Source Sans Pro’] = ‘Source Sans Pro:400,600,800’;
return $fonts;
}It does show up on the enfold dropdown menu, but when I select it it does not take effect on the frontend. Is there something else I need to do to get the font to work? Also, how do I get the enfold dropdown to display the different font weight options?
June 1, 2015 at 7:15 pm #452716Also, how would I add additional weights to fonts that are already included with enfold? For example I would like to add the 300 and 800 weight for Raleway font that is included with enfold.
- This reply was modified 9 years, 6 months ago by alex5252.
June 2, 2015 at 6:22 pm #453290Hi!
It looks like you currently have Raleway selected and it seems to be loading fine. Is there a certain area that your wanting to change?
For additional fonts and weights it’s the same process.
add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’); function avia_add_heading_font($fonts) { $fonts[‘Source Sans Pro’] = ‘Source Sans Pro:400,600,800′; $fonts[‘Raleway’] = ‘Raleway:400,600,800′; return $fonts; } add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’); function avia_add_content_font($fonts) { $fonts[‘Source Sans Pro’] = ‘Source Sans Pro:400,600,800′; $fonts[‘Raleway’] = ‘Raleway:400,600,800′; return $fonts; }
Best regards,
ElliottJune 7, 2015 at 11:21 am #455618Hi Elliot, I am having the same issue.
I have added the above code to my function.php file (with my preferred google font), but there is no way to select from the various weights in the style settings. I would like to choose ‘Lato light’ for paragraph text and Lato normal weight for the headings. Is this possible?
Thanks so much for your help.
June 8, 2015 at 10:47 am #455937Hi!
For the heading elements, you can modify the font weight on Enfold > Advanced Styling panel. Edit the heading element then define the font weight. For the body text, you can use the Quick CSS field:
p, body p { font-weight: 300 !important; }
Adjust the font weight value if necessary.
Cheers!
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.