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

    Hello all,

    First off, I’m very new to this, just sort of feeling my way through, so please have mercy!

    I am using a child theme and I’ve followed the instructions at:
    http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/
    … to the letter. Or at least I think I have.

    Now whenever I try to even access my website I get the following displayed by the browser:

    Parse error: syntax error, unexpected T_STRING, expecting ‘]’ in /var/sites/g/ghostsound.uk/public_html/wp-content/themes/enfold-child/functions.php on line 11

    For reference, the function.php file of my child theme now reads as follows:

    <?php
    
    /*
    * Add your own functions here. You can also copy some of the theme functions into this file. 
    * WordPress will use those functions instead of the original functions then.
    */
    
    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts[‘Permanent Marker’] = ‘Permanent Marker';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    
    $fonts[‘Permanent Marker’] = 'Permanent Marker’;
    return $fonts;
    }

    Can anybody tell me where I’ve gone wrong?

    #517600

    Hi markedgeller!

    Upload a fresh copy of the functions.php file and send us a WordPress login instead of cPanel login and we’ll take a look.

    Regards,
    Elliott

    #517607

    Wonderful, thank you very much! All done.

    #517877

    Hi,

    I added the following code to your functions.php:

    add_filter( 'avf_google_heading_font',  'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Permanent Marker'] = 'Permanent Marker';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font',  'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    $fonts['Permanent Marker'] = 'Permanent Marker';
    return $fonts;
    }

    You will find the new font at the bottom of each font list.

    Best regards,
    Rikard

    #517911

    Thank you for your help Rikard.

    I’ve managed to duplicate what you did to add more fonts. I’d just like to point out that there is an error in this page of the documentation that was causing the problem I detailed above:
    http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/
    There is a line break between the { and $fonts in the avia_add_content_font part of the code. Its the second half of the code snippet on that page. I just copied and pasted it, and didn’t notice there was an error. It was only after carefully comparing your code above and the help document that I noticed it.

    Also, I wasn’t aware that there is a difference between ‘ and ‘

    They look identical on this forum to me, but different when using something like the Courier font within notepad! Another bit of careful comparison was what it took to notice this!

    Once again, thanks for your help. This ticket can be closed now.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Error following google font install’ is closed to new replies.