Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #452267

    I am trying to add additional Google Fonts to the Enfold font options.

    I have added this to me Functions.php of my child theme:

    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;
    }

    It does show up on the enfold dropdown menu, but when I select it it does not take effect on the frontend. Is there something else I need to do to get the font to work? Also, how do I get the enfold dropdown to display the different font weight options?

    #452716

    Also, how would I add additional weights to fonts that are already included with enfold? For example I would like to add the 300 and 800 weight for Raleway font that is included with enfold.

    • This reply was modified 9 years, 6 months ago by alex5252.
    #453290

    Hi!

    It looks like you currently have Raleway selected and it seems to be loading fine. Is there a certain area that your wanting to change?

    For additional fonts and weights it’s the same process.

    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′;
    $fonts[‘Raleway’] = ‘Raleway: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′;
    $fonts[‘Raleway’] = ‘Raleway:400,600,800′;
    return $fonts;
    }

    Best regards,
    Elliott

    #455618

    Hi Elliot, I am having the same issue.

    I have added the above code to my function.php file (with my preferred google font), but there is no way to select from the various weights in the style settings. I would like to choose ‘Lato light’ for paragraph text and Lato normal weight for the headings. Is this possible?

    Thanks so much for your help.

    #455937

    Hi!

    For the heading elements, you can modify the font weight on Enfold > Advanced Styling panel. Edit the heading element then define the font weight. For the body text, you can use the Quick CSS field:

    p, body p {
    font-weight: 300 !important;
    }

    Adjust the font weight value if necessary.

    Cheers!
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.