Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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!

    #561396

    Hi 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,
    Yigit

    #561398

    Thank 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>

    #561403

    Hey!

    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 Fonts

    Cheers!
    Yigit

    #561405

    Why would this lock me out of my development site?

    #561410

    Hey!

    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 issue

    Best regards,
    Yigit

    #561423

    Fixed. THANK YOU!!!! I was freaking out.

    #561428

    Hi!

    You are welcome :)
    Let us know if you need further help on this case :)

    Regards,
    Yigit

    #562110

    Hi 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;
    }

    #562114

    Hey!

    Do you mind creating a temporary admin login and posting it here privately?

    Cheers!
    Yigit

    #562119

    Yes, it’s below. Thanks!

    #562139

    Hi!

    I moved the code higher in functions.php file. Please review your website now

    Best regards,
    Yigit

    #562156

    Hey 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

    #562346

    Hi,

    I’m not sure but I guess other code you have in that file would be interfering with the new code.

    Best regards,
    Rikard

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.