WordPress.org

Ready to get started?Download WordPress

Forums

Parsing error in functions.php file (3 posts)

  1. onetz53
    Member
    Posted 1 year ago #

    I was tinkering with some code in my functions.php file of the WordPress Twenty Eleven theme, and then whenever I tried to update the file, I got a parse error screen that read as follows:

    Parse error: syntax error, unexpected T_CLASS in /home/tmznhy/public_html/wp-content/themes/twentyeleven/functions.php on line 585.

    I went back to the file and returned it to how it was, but I still got the same error screen. What's worse, I couldn't even click onto another part of my WordPress dashboard without going straight to the error screen. I downloaded the Twenty Eleven theme on a separate tab and copy/pasted the functions.php file to mine, and STILL I got the parsing error screen. Now I can't even log back into my account without going straight to the error screen.

    I'm so frustrated and mad at myself for messing with this file, and I have no idea how to even access my blog again. Please help.

  2. onetz53
    Member
    Posted 1 year ago #

    After doing some Google-searching, I figured out how to log into cPanel and get back to the functions.php file without logging directly into WordPress. So at least I figured out how to see the file again after being locked out of my WP dashboard. Still have no idea what is wrong with the code though. Here are lines 585-587:

    <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>

    Again, I copy/pasted straight from the original Twenty Eleven theme coding, so this issue is absolutely maddening to me right now. Would so greatly appreciate anyone's help in this matter.

  3. onetz53
    Member
    Posted 1 year ago #

    I guess after another copy/paste in cPanel, all is now well. I guess this thread proves that a little Googling and trial/error go a long way. Thanks anyway, would-be helpers!

Topic Closed

This topic has been closed to new replies.

About this Topic