Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #211582

    I added this to my child theme functions php to add the google font Montserrat to the header font drop down list, without success:

    add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
    function avia_add_heading_font($fonts)
    {
    $fonts[‘Montserrat’] = ‘Montserrat:400,700′;
    return $fonts;
    }

    add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
    function avia_add_content_font($fonts)
    {
    $fonts[‘Montserrat’] = ‘Montserrat:700′;
    return $fonts;

    not sure – got the css from another post on adding google fonts to the header font choice.
    thanks for your help

    #211813

    Hi MUNFORD!

    Add the code after this line:

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

    Around line 16.
    Regards,
    Josue

    #211820

    Hi MUNFORD!

    Please use this:

    add_filter('avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts) {
    $fonts['Montserrat'] = 'Montserrat:400,700';
    return $fonts;
    }
    
    add_filter('avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Montserrat'] = 'Montserrat:700';
    return $fonts;
    }

    Best regards,
    Ismael

    #211906

    HI Ismael – thanks for the code. Should that be added to my child theme functions.php?

    Josue suggested if should be added after this line:
    if(isset($avia_config[‘use_child_theme_functions_only’])) return;

    but I’m confused about where to put it.
    thanks

    #212019

    Hey!

    Yes, in functions.php after the line i suggested, Ismael code will work.

    Best regards,
    Josue

    #212196

    thanks I will try that

    #212208

    Hey!

    Please let us know after you try it so we can mark this thread as resolved

    Cheers!
    Yigit

    #213027

    resolved thanks

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘adding header font’ is closed to new replies.