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

    Hi
    I am trying to add two or more Googlefonts. I put this in the Child theme functions.php

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

    That worked fine. But when I put the same again, but with another font name) it crashed and produced a Fatal Error message. Adding any single font seems fine but more than one creates the error message.

    #365840

    Hey envapk2!

    please refer to this post: https://kriesi.at/support/topic/adding-google-fonts-plural/#post-166980

    Best regards,
    Andy

    #366331

    Hi Andy
    That’s great, many thanks

    Peter

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to add more than one Googlefont’ is closed to new replies.