WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] function.php error prevents login (14 posts)

  1. elizwood
    Member
    Posted 2 years ago #

    I tried adding content to the theme's function.php file. Got this error:

    Parse error: syntax error, unexpected T_VARIABLE in /home/jessfeed/public_html/wordpress/wp-content/themes/BuilderChild-Heat-Wave/functions.php on line 245

    I copied original function.php from the theme (untouched original) and uploaded to site. Still get the same error. The original function.php file is only 54 lines!

    I removed the function.php, cleared my browser cache and I still get the same error.

    What am I missing and how to I get my site back?

  2. govpatel
    Member
    Posted 2 years ago #

    If you did not make any other change to theme functions.php file then try deleting and then upload original

  3. elizwood
    Member
    Posted 2 years ago #

    I copied original function.php from the theme (untouched original) and uploaded to site. Still get the same error. The original function.php file is only 54 lines!

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Try re-uploading the whole theme.

  5. elizwood
    Member
    Posted 2 years ago #

    I tried again to take the functions.php file from the downloaded and unzipped theme. Same error. Could it be a database error? I was adding images to a page and went into the functions.php from the dashboard editor. I added code and then got the error. I hit back and went back to the editor and removed the code. Same error.

    I even deleted the functions.php from the child theme and still got the same error. I reloaded the original theme functions.php several different times and still have the error. I cannot get into the site at all.

    I am using Dreamweaver to access the files and edit them now. Is there a way to change the theme without being able to launch WordPress?

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    Try re-uploading the whole theme to wp-content/themes using FTP.

  7. elizwood
    Member
    Posted 2 years ago #

    I renamed the theme and uploaded it again with Dreamweaver. Same error message.

  8. govpatel
    Member
    Posted 2 years ago #

    Use a ftp filezilla and upload whole theme in theme folder

  9. esmi
    Forum Moderator
    Posted 2 years ago #

    Are you running any caching plugins? Are you sure you are uploading an fresh copy of the right theme?

  10. You can also try re-naming the theme folder temporarily (say from /yourthemee to /yourtheme-broken or similar) which will force WordPress to look for the default theme, like Twenty Eleven or Twenty Ten, depending on what you have uploaded.

    This will get you back into the dashboard, at least.

  11. elizwood
    Member
    Posted 2 years ago #

    THANK YOU everyone for your support and clear thoughts. When I went to use Filezilla, I realized I was uploading to my local server and not the online server. Operator error. I cleaned up the functions.php and uploaded it and guess what? It worked. Thank you all once again.

  12. elizwood
    Member
    Posted 2 years ago #

    JerrySarcastic - Thanks for this suggestion. It may come in handy in the future.

  13. govpatel
    Member
    Posted 2 years ago #

    I have heard I do not know if is true that Dreamweaver adds some other characters when you edit with it and php files are delicate specially functions.php file as even dot makes the difference and breaks the theme.

    That is why we asked you use filezilla.

  14. elizwood
    Member
    Posted 2 years ago #

    govepatel - Good advice. I am still learning and I appreciate every helping on this forum.

Topic Closed

This topic has been closed to new replies.

About this Topic