Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #299404

    How do I add additional Google Fonts to the font selection on Enfold for the Defines the Font for your body text area?

    Thanks.

    I tried this in functions.php but it didn’t work:

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘Muli’] = ‘Muli’;
    return $fonts;
    }

    • This topic was modified 9 years, 9 months ago by Micheal0424.
    #299412

    Hey Micheal!

    Are you using a child theme? if you are not, use this plugin to insert this kind of functions.

    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts) {
    	$fonts['Muli'] = ‘Muli’;
    	return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts) {
    	$fonts['Muli'] = ‘Muli’;
    	return $fonts;
    }

    Once you done that you should be able to see the new font in the Theme Options.

    Best regards,
    Josue

    #299465

    That worked perfectly, and that plugin is great!!

    Thanks a lot!!

    #299466

    You are welcome, always glad to help :)

    Regards,
    Josue

    #303062

    Hello,

    I would like to add a new content font in “enfold/general styling/defines the font for the body text. I have created a quick CSS as you mentioned in this spot:

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘Roboto’] = ‘Roboto’;
    return $fonts;
    }

    Nothing happens in the drop down list “defines the font for the body text”. Could you please help me?
    Carine

    #303070

    Hi Carine!

    You should put that code in the Theme functions.php, not Quick CSS.

    Cheers!
    Josue

    #303848

    Thanks, Josue

    Where can I find functions.php? I don’t see anything in WP admin.
    Thx
    Carine

    #303849

    Hey Carine!

    Please go to Appearance > Editor and find Functions.php file on the right

    Cheers!
    Yigit

    #303912

    Thx. Strange, I don’t have this option.
    My WP is hosted under one.com. I will ask them. But you know maybe the reason ;-)
    Carine

    #303928

    Hey!

    You can try re-updating WordPress and check if that helps. You can also connect via FTP and edit functions.php file manually. You can find it inside wp-content/themes/enfold folder

    Regards,
    Yigit

    #303940
    #303942

    Hey!


    @micheal0424
    Thanks for your suggestion Michael!

    Regards,
    Yigit

    #303943

    No problem, hopefully it works.

    Best of luck!!

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Adding Additional Google Fonts?’ is closed to new replies.