In order to fix the Syntax Error you need to edit the code that caused this error. You can either remove it or fix the syntax. Often beginners freak out because this error causes your entire site to become inaccessible. If you pasted the code using your WordPress dashboard Appearance » Editor section, then you are locked out. So how do you edit the code? Check out our guide on locked out of WordPress admin. The only way to fix this is to access the file you last edited using FTP.
After installing the FTP program, connect it to your website and go to the theme file that needs editing. In case you forgot which file you need to edit, just look at the error code. The error will tell you exactly which file and which line you need to edit.
You can either remove the code you last added or write the code in correct syntax. Once you are done removing / editing the code, save the file and upload it back to your server. Come to your WordPress site and refresh the page, and your site will be working.