Hi there
Is there a way (via plugin or?) to add many Google fonts to the Enfold Theme without having to manually add each one in functions.php?
Thanks in advance!
Justin
Hey Justin,
Maybe a plugin like this could help you out? https://wordpress.org/plugins/wp-google-fonts/
Regards,
Rikard
Yes but that doesn’t then allow me to choose them in the Enfold panel??
Hi!
You would need to use custom CSS code. We still think it is better to add custom code to functions.php file. If you need help with it, we can gladly help :)
Best regards,
Yigit
Ah ok yes i’d rather do something properly. I basically would like to add quite a lot of Google fonts so that I can choose in the drop down control panel which one’s to use.
For example in the first instance how would I add ‘Source Sans Pro’?
Best
Justin
Hi!
Please add following code to Functions.php file in Appearance > Editor
add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
function avia_add_heading_font($fonts)
{
$fonts['Source Sans Pro'] = 'Source Sans Pro:400,700,400italic,700italic';
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,700,400italic,700italic';
return $fonts;
}
Regards,
Yigit
Thank you! Whereabouts in the functions.php code should i place this?
Many thanks that is great. Do you know how i can specify font weights? For example if i wanted Light 300 for the body font?