WordPress.org

Ready to get started?Download WordPress

Forums

Parse error: syntax error, unexpected '}' (3 posts)

  1. harmonyw
    Member
    Posted 1 year ago #

    I deleted some of the code under function.php but saved the original. After deleting the code, I got this message:

    Parse error: syntax error, unexpected '}' in /home/harmonyw/public_html/index/wp-content/themes/womack-819848552/functions.php on line 40

    The message still appeared even after I put the original code back in. Please help me fix!

    Here's the code:
    Large code excerpts: [Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]

  2. Change this line:

    return 'ID) . '">' . ' [ Read More ]' . '';

    to :

    return 'ID)' . '">' . ' [ Read More ]' . '';

  3. lellobot
    Member
    Posted 1 year ago #

    For me, I got this error because I had only carriage returns (i.e. /r) in my file, instead of having carriage returns and new lines (i.e. /r/n).

    Hopefully this helps someone who comes across this post in the future.

Topic Closed

This topic has been closed to new replies.

About this Topic