-
AuthorPosts
-
January 7, 2016 at 5:50 pm #561392
Hi There,
I followed instructions to add a google font to the functions.php file. However when I added the code, I received this message:Parse error: syntax error, unexpected ‘<‘ in /home/jsdgjcif/public_html/creo/wp-content/themes/enfold/functions.php on line 521
So I removed the code I added, updated the the form and received the message. Now I can’t even log onto the dev site because I get the same message. Please help!
January 7, 2016 at 5:56 pm #561396Hi raisonbrands!
Please go to wp-content/themes/enfold/functions.php file and remove the code you added and then post the code you added. You can also post FTP credentials here privately and we can fix the code for you.
Best regards,
YigitJanuary 7, 2016 at 5:59 pm #561398Thank you but I can’t even log onto my dev site. I had also removed the code once I got the error message so it’s not even in there anymore??
This is the code that I added from Google fonts:
<script type=”text/javascript”>
WebFontConfig = {
google: { families: [ ‘Roboto+Slab:400,100,300,700:latin’ ] }
};
(function() {
var wf = document.createElement(‘script’);
wf.src = (‘https:’ == document.location.protocol ? ‘https’ : ‘http’) +
‘://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js’;
wf.type = ‘text/javascript’;
wf.async = ‘true’;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(wf, s);
})(); </script>January 7, 2016 at 6:09 pm #561403Hey!
Sorry forgot to mentioned that you should go to functions.php file via FTP and then remove the code.
Then you can refer to this post – http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/ to add new Google FontsCheers!
YigitJanuary 7, 2016 at 6:11 pm #561405Why would this lock me out of my development site?
January 7, 2016 at 6:16 pm #561410Hey!
There are few reasons why you could be locked out of your site and PHP errors is one of them :)
Removing the code via FTP will solve the issueBest regards,
YigitJanuary 7, 2016 at 6:32 pm #561423Fixed. THANK YOU!!!! I was freaking out.
January 7, 2016 at 6:37 pm #561428Hi!
You are welcome :)
Let us know if you need further help on this case :)Regards,
YigitJanuary 8, 2016 at 5:15 pm #562110Hi Yigit,
We want to add Roboto Slab to the site and as per the above link added it to the main ENFOLD (not 2016) functions php but are not having any luck getting it to actually appear. Here’s the exact code that we used, can you tell us what we need? Thanks!
add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Roboto Slab’] = ‘Roboto Slab:400,700,400italic,700italic’;
return $fonts;
}add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{$fonts[‘Roboto Slab’] = ‘Roboto Slab:400,700,400italic,700italic’;
return $fonts;
}January 8, 2016 at 5:20 pm #562114Hey!
Do you mind creating a temporary admin login and posting it here privately?
Cheers!
YigitJanuary 8, 2016 at 5:31 pm #562119Yes, it’s below. Thanks!
January 8, 2016 at 6:17 pm #562139Hi!
I moved the code higher in functions.php file. Please review your website now
Best regards,
YigitJanuary 8, 2016 at 6:39 pm #562156Hey thank you so much, seems to be in complete working order! Quick question for you, why does it work at the top rather than at the bottom?
Thanks again
January 9, 2016 at 7:48 am #562346 -
AuthorPosts
- You must be logged in to reply to this topic.