Hi,
How do I install a Google font into the enfold theme?
Can I use Google Fonts to replace the Navigation font as well as the body and heading font?
Is there also a way of using a custom google font in layerslider? if so then how do I implement?
Hi!
Please add this to your child themes functions.php:
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;
}
Change the Source Sans Pro font with the font you’re trying to use.
Cheers!
Rikard
Will this php also allow me to ad a custom Font to the Navigation menus and the layer-slider?
Hi!
Yes, you can target the navigation font in Dashboard > Enfold > Advanced Styling > Main Menu Links.
As for the LayerSlider, what elements are you using? As an example you could change the H5 or H6 elements in the same area and then use those in the LayerSlider.
Regards,
Elliott
Hi Elliot,
Thank you for getting back to me. I am looking to edit the text headings in the Layer Slider yes.
Hi,
If you are using an element that’s “editable” in Enfold > Advanced Styling (for example h1, h2, h3, h5, h6) you should be able to select the Font there and it will apply to LayerSlider.
Cheers!
Josue