Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #374048

    Hi,

    I have already added without any problem the font signika. using this code in my functions.php in my child theme:

     //* Ajouter google font signika *//
    
    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Signika'] = 'Signika:400,600,800';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Signika'] = 'Signika:400,600,800';
    return $fonts;
    }

    But when I do the same with Parisienne font,

    //* Ajouter google font parisienne *//
    
    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Parisienne'] = 'Parisienne:400';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Parisienne'] = 'Parisienne:400';
    return $fonts;
    }

    The site crash with a fatal error on line 44 which is a line where there only is a closing } and everything seems fine.

    How can I add this font??

    Please I need help on that.

    Thanks

    #374173

    Hey chryseis!

    It’s because the function names are the same. Try this instead.

    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Signika'] = 'Signika:400,600,800';
    $fonts['Parisienne'] = 'Parisienne:400';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Signika'] = 'Signika:400,600,800';
    $fonts['Parisienne'] = 'Parisienne:400';
    return $fonts;
    }

    Cheers!
    Elliott

    #376699

    Hi,

    Sorry for the delay for answering, I didn’t have a notification…

    It’s working perfectly !! Thanks a lot!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘I cannot add 'Parisienne' google font to my child theme’ is closed to new replies.