Hi there,
I have tried adding a google font called Dosis to my Enfold theme.
I found the code below in another thread for this type of issue. I copied it in the functions section of the theme. The font is still not there.
I then installed google easy fonts. But when I click the customize button on each page, it does not load with the options to change the typography. I have attached the screenshot to show these lack of options.
Can someone please help me.
add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Dosis’] = ‘Dosis:400,700’;
$fonts[‘Dosis’] = ‘Dosis:400,700,400italic,700italic’;
return $fonts;
}
add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{
$fonts[‘Dosis’] = ‘Dosis:400,700,400italic,700italic’;
$fonts[‘Dosis’] = ‘Dosis:400,700’;
return $fonts;
}
Hey vgagovic,
I followed the steps here: http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/
and added this to your functions.php:
/* start Register Additional Google Fonts for Theme Options*/
add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
function avia_add_heading_font($fonts)
{
$fonts['Dosis'] = 'Dosis:400,700,400italic,700italic';
return $fonts;
}
add_filter( 'avf_google_content_font', 'avia_add_content_font');
function avia_add_content_font($fonts)
{
$fonts['Dosis'] = 'Dosis:400,700,400italic,700italic';
return $fonts;
}
/* end Register Additional Google Fonts for Theme Options*/
And choose Dosis from the General Styling font dropdown. I also disabled the google easy fonts plugin. So now it works :)
*Please note that you should use a child theme or your setting will be lost on your new upgrade.
Read about it & Get it here
Best regards,
Mike