Support » Fixing WordPress » Parse error: syntax error

  • I wanted to add twitter gadget to my wordpress, I pasted the code that twitter gives in one of the code pages of wp-admin panel, then, i got: Parse error: syntax error, unexpected ‘<‘ in /home/melisin/public_html/wp-content/themes/twentyeleven/inc/widgets.php on line 167

    now even if I try to see my blog or want to log in from wp-admin page, I get this error. I looked up in the internet and saw that I got hacked. Then people said change your password but how can I, when I can’t even login from wp-admin? Help please? Is it a trojan?

Viewing 6 replies - 1 through 6 (of 6 total)
  • If what you pasted above (“Parse error” etc) is the error you looked up, then no, it doesn’t mean you got hacked — it just means that you pasted something wrong. Don’t panic.

    Because you can’t get into the site, you’ll have to fix it in the control panel for your hosting account or through FTP. Find the file that you edited (was it the widgets.php file in your twentyeleven theme? Looks like it.) and delete the code that you added.

    If you’re having trouble sorting out which parts were yours, you can grab a fresh copy of Twenty Eleven from the Theme Directory and replace that entire file.

    After that, you should be able to log back in.

    Part 2 is to get back to what you were actually trying to do — can you point to the code you were trying to add? Is there something that code was supposed to do that any of the many twitter widgets already out there don’t do? We can help you get to where you’re going, but first, try to fix things up and check back in.

    And again, don’t panic. I sincerely doubt there’s any hacking involved here.

    oh thanks a lot, I was really very worried. Ok I’ll try to manage it through my hosting account as you said tomorrow and write here the result. Thanks a lot!!!!!!!!!!!!

    You’re welcome! And please do check back to let us know how it goes!

    thanks a lot. I got to my ftp and deleted the code that I entered and it’s ok now! Thanks!

    I am trying to use wamp. I think I have it all setup BUT, I get a syntax error in my wp-config that says it’s on line 22. I don’t know what line that is. I think it is either my password or Authentication . Can you help me. thanks.

    It also says unexpected T_String

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Parse error: syntax error’ is closed to new replies.