WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Syntax error unexpected

[Resolved] Syntax error unexpected

  • Dear WordPress,

    I tried to change the code to include a video in the custom header in and I received the following message Parse error: syntax error, unexpected ‘<‘ in /var/www/vhosts/trndmrkr.com/httpdocs/wp-content/themes/renkon/inc/custom-header.php on line 12.

    After this tried to change back to the original code again (and save the original code), but I keep getting the error message.Further more I cannot log in to the dashboard and it seems the e-mail linked to my site (info@trndmrkr.com) does not respond either.

    Can anyone please help me?
    My site is http://www.trndmrkr.com
    Thank you in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Best to never edit your theme files from WP-Admin > Appearance > Editor. If you do that and you make a mistake, you will not be able to access the admin area.

    You’ll want to edit your theme files via FTP or (if your web host has it) the cPanel > File Manager. Do that and you can fix your mistake, then you will be able to access the admin area again.

    The error you were getting was probably caused by putting HTML inside of PHP tags, like this:

    <?php
        // some PHP code
    
        <img src="//example.com/my-image.png" />
    
        // more PHP code
    ?>

    Hi Shaun, thanks I’ll solve it on the FTP!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Syntax error unexpected’ is closed to new replies.
Skip to toolbar