After trying to replace the wordpress theme , it says that the functions.php file in the theme catalogue - the last line - is not ok

Parse error: syntax error, unexpected $end in ... /themes/themename/functions.php on line 1500

line 1500 is actually only symbol ?>


ok, here is the pastebin link of the functions.php file that has error


p.s. i am wondering - since its supposed to be a ready made template - then how could it be error - its supposed to work

p.s. may be its some kind of thing that can be messed up by changing wordpress settings or it uses some bad plugins ? ( like permalinks or some cache plugin etc. ) ...

  • 2
    remove the last ?> – onetrickpony Aug 1 '11 at 20:20
  • @One Trick Pony that's a perfectly valid answer; why put it as a comment? :) – Chip Bennett Aug 3 '11 at 11:47

I believe that means there's an extra close-function tag somewhere in your functions.php file, $end;, } or such. You'll have to pick through the code to find it. A text editor that color-codes code can help with this, but you'll still have to click around and find it.

Best of luck!

  • it says the same - for other themes also , there is only ?> sign on that line , should there be also $end; somewhere on the last line – Veebia Aug 1 '11 at 18:04
  • More likely it's an extra $end or } somewhere earlier in your code - it won't be on that line that's showing the error. If you want to post the entire functions.php file here (or over on pastebin.com and share a link) someone might be able to help you pick through and find it. – Michelle Aug 1 '11 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.