backpackwithbrock
Member
Posted 6 months ago #
I updated some code in my 'Theme Functions' and am now receiving the following message:
Parse error: syntax error, unexpected '<' in /home/content/92/5391192/html/wp-content/themes/canvas/functions.php on line 81
I cannot access my website URL or from the admin background. I do however thankfully have Stylesheet still open.
My site is: http://www.backpackwithbrock.com
And this is the link to the code I was attempting to input - in order get my thumbnails showing again when I share a post on Facebook.
http://www.staenzwebsolutions.com/avoid-no-thumbnail-or-unrelated-thumbnail-image-while-sharing-post-on-facebook/477/
I need to get my site up and running asap. Any help to fix this and get it back would be appreciated.
Cheers,
Brock
Note: I am novice when it comes to CSS and such.
You will need to upload a fresh copy of your theme.
olavxxx
Member
Posted 6 months ago #
Your PHP code has to be between:
<?php
AND
?>
So if you by accident do something like:
<?php <img src... you will get this error!
If you need some regular html between the php, you do like so:
<?php /* some php code here */?>
<!--# Some HTML here -->
<?php /* Some php here */ ?>
backpackwithbrock
Member
Posted 6 months ago #
When inputting the code - I went into functions.php like advised, inputted the code and came up with this error.
If I am in my FTP File Manager trying to remove that code, is there any idea where I would find that section of coding?
Try downloading your theme's functions.php file, opening it in a plain text editor, removing the code you added and re-uploading the amended file.
olavxxx
Member
Posted 6 months ago #
You should not be putting any CSS in functions.php
functions.php is for the theme functions, like defining widgets, thumbnails, hooks, what the theme supports, etc.
As your error is on line 81, most likely your code is on line 80 or 81.
backpackwithbrock
Member
Posted 6 months ago #
Thanks for all your help crew! I figured it out with your help!
We're up and running again.