Tagged: error, google fonts
-
AuthorPosts
-
October 12, 2015 at 6:08 pm #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?
October 12, 2015 at 7:11 pm #517600Hi 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,
ElliottOctober 12, 2015 at 7:13 pm #517607Wonderful, thank you very much! All done.
October 13, 2015 at 8:46 am #517877Hi,
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,
RikardOctober 13, 2015 at 9:39 am #517911Thank 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.
-
AuthorPosts
- The topic ‘Error following google font install’ is closed to new replies.