Hi,
I would like to add Google Font Source Sans Pro in weights: 400,300,700 to my site
I’ve read the following thread: https://kriesi.at/support/topic/new-custom-font/
which advised to : “Insert following code at the bottom of functions.php and then select the font from the dropdown:”
add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
function avia_add_heading_font($fonts)
{
$fonts['Source Sans Pro'] = 'Source Sans Pro:400,300,700';
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,300,700';
return $fonts;
}
I’ve added this filter, uploaded but still can’t see the fonts in Enfold > General Styling > Heading Font or Defines the Font for your body text drop down menus.
Where have I gone wrong?
Thanks.
Hi,
Can you please create me an administrator account? post it here as a private reply.
Regards,
Josue
Hi!
I’m unable to edit functions.php but the fix is simple, you just need to put the font code immediately after this line in functions.php:
if(isset($avia_config['use_child_theme_functions_only'])) return;
Cheers!
Josue
Brilliant, thanks Josue.
Moved the code up to just below
if(isset($avia_config['use_child_theme_functions_only'])) return;
and I can now see and select that font in the admin area.
Thank you.