WordPress.org

Ready to get started?Download WordPress

Forums

Entered wrong code, now can't access site (9 posts)

  1. freewrite
    Member
    Posted 7 years ago #

    I was trying to add the Smart Archives plugin, and typed in the wrong code.

    The instructions say to call the function:

    <?php smartArchives('type','category ID'); ?>

    but I mistakenly put in "both" after 'type' and "12" after 'category ID'

    Then when I tried to view my site, I just got a big, blank white screen and this message:

    Parse error: syntax error, unexpected T_STRING in /home/idothing/public_html/wp-content/plugins/smartarchives.php on line 1

    Please help!

  2. freewrite
    Member
    Posted 7 years ago #

    Sorry, forgot to add that my URL is

    http://idothings.info

    And there's no way for me to get into the dashboard--all I get is the error message.

  3. moshu
    Member
    Posted 7 years ago #

    That's why nodbody should edit any file online.
    You must have the theme files you edited on your computer. Upload an unaltered copy.

  4. freewrite
    Member
    Posted 7 years ago #

    Thanks, yes, I have the original theme files, but the changes I made--I'm not sure how I could have done it differently. Even if I'd copied the php file to notebook, copied the plugin code, made my stupid mistake, then copied that to the existing php file--wouldn't I still have the same problem? I wouldn't know there was a problem with the code until I uploaded the file. I'm not being argumentative--just want to avoid this in the future. Thanks for the response.

  5. moshu
    Member
    Posted 7 years ago #

    Before editing any file - any responsible webmaster makes a backup copy to have it handu in cases like this, when something goes wrong.

    And in code you replace the generic arguments.
    <?php smartArchives('both','12'); ?>

  6. whooami
    Member
    Posted 7 years ago #

    yes you would have, but you probably wouldnt have needed to come here to ask for help, because you would have probably realized that you just needed to go back in with an ftp client and upload a fresh file.

    Since you used" the dumbed down way" (i dont mean that as an insult either) to make the edit -- it probably didnt occur to you use your ftp access to fix it.

  7. freewrite
    Member
    Posted 7 years ago #

    Thanks, moshu and whooami. I learned a valuable lesson.

  8. freewrite
    Member
    Posted 7 years ago #

    So...I just deleted the files from my ftp server and re-uploaded the original theme files. Is there something else I need to do? I still get the same error message when I try to access WordPress Admin.

  9. freewrite
    Member
    Posted 7 years ago #

    Never mind--figured it out (with the help of previous forum messages!) After uploading the original theme files, I deleted all the plug-ins. Now I've got most of my original content back. Phew! Thanks again for the help.

Topic Closed

This topic has been closed to new replies.

About this Topic