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

    Hi,

    I would like to add Google Font Source Sans Pro in weights: 400,300,700 to my site

    I’ve read the following thread: https://kriesi.at/support/topic/new-custom-font/

    which advised to : “Insert following code at the bottom of functions.php and then select the font from the dropdown:”

    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Source Sans Pro'] = 'Source Sans Pro:400,300,700';
    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,300,700';
    return $fonts;
    }

    I’ve added this filter, uploaded but still can’t see the fonts in Enfold > General Styling > Heading Font or Defines the Font for your body text drop down menus.

    Where have I gone wrong?

    Thanks.

    #327581

    Hi,

    Can you please create me an administrator account? post it here as a private reply.

    Regards,
    Josue

    #327614
    This reply has been marked as private.
    #327650

    Hi!

    I’m unable to edit functions.php but the fix is simple, you just need to put the font code immediately after this line in functions.php:

    if(isset($avia_config['use_child_theme_functions_only'])) return;
    

    Cheers!
    Josue

    #327952

    Brilliant, thanks Josue.

    Moved the code up to just below

    if(isset($avia_config['use_child_theme_functions_only'])) return;

    and I can now see and select that font in the admin area.

    Thank you.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Would like to add a custom font’ is closed to new replies.