WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Parse error: syntax error; site totally crashed trying to add google analytics (4 posts)

  1. dak0tah
    Member
    Posted 2 years ago #

    Parse error: syntax error, unexpected '<' in /home/content/97/9415397/html/wp-content/themes/twentyeleven/functions.php on line 618

    I have a wordpress site hosted with the godaddy 4GH economy package. I am still using the original theme, twenty eleven, but had made slight tweaks, namely a view count snippet and an SEO plugin:

    http://wpsnipp.com/index.php/functions-php/track-post-views-without-a-plugin-using-post-meta/

    http://yoast.com/wordpress/seo/

    After getting these working, I wanted to try out Google Analytics. I added the necessary code to the bottom of my functions.php right below the snippet posted above. As soon as I updated it, the entire site, dashboard and all, crashed, displaying the above error.

    I can't access anything. Is there anyway to reset my functions.php to default? Do I have to restart my whole blog?

  2. Pann
    Member
    Posted 2 years ago #

    Restore the functions.php file (or carefully revert the changes you made).

    Then go to yoursite.com/wp-admin/theme-editor.php and click "Header" on the right-hand menu. Navigate to "</head>" (you can use CTRL+F) and insert the google's code right above the tag.

    Save and confirm everything is alright :)

  3. dak0tah
    Member
    Posted 2 years ago #

    How do I restore the functions.php without accessing my page? I can't get to any of the dashboard or admin settings. I emailed GoDaddy but I dunno if they can do anything.

  4. Pann
    Member
    Posted 2 years ago #

    Asking on this forum implies that you have some means of accessing your site/server.

    If you don't even have FTP access in order to restore an original functions.php file then yes, calling godaddy was always your only option.

Topic Closed

This topic has been closed to new replies.

About this Topic