Tagged: google fonts
Hi there,
I’ve looked at various posts regarding adding new Google fonts to Enfold, however all the post solutions I’ve tried have no worked or completly broke the site, such as adding this script to the functions.php file from one post;
(adding add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Mr De Haviland’] = ‘Mr De Haviland:400,700’;
$fonts[‘Mr De Haviland’] = ‘Mr De Haviland:400,700,400italic,700italic’;
return $fonts;
}
add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{
$fonts[‘Sacramento’] = ‘Sacramento:400,700,400italic,700italic’;
$fonts[‘Sacramento’] = ‘Sacramento:400,700’;
return $fonts;
}
add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{
$fonts[‘League Script’] = ‘League Script:400,700,400italic,700italic’;
$fonts[‘League Script’] = ‘League Script:400,700’;
return $fonts;
}.
Please can you instruct me on how to add additional fonts for site wide usage.
Many thanks
I’d also like to know this. How to add fonts so they show up under Enfold’s Theme Styling Customization page. And not just google fonts, but any font I upload.
Hi!
The theme only support google fonts so none others can be loaded in at the moment to show in the styling options. See this post for loading in your font:
https://kriesi.at/support/topic/add-a-new-custom-font/#post-211526
Make sure to try that exact function before modifying it for your custom font.
The script
Regards,
Devin
Hi @MINFORD,
No, you can add it into the function with the weight you want.
Best regards,
Devin