Community Forums › Forums › Archived Forums › General Discussion › Error message in child theme
Tagged: child theme error function.php
- This topic has 4 replies, 3 voices, and was last updated 10 years, 11 months ago by Susan.
-
AuthorPosts
-
May 2, 2013 at 9:48 pm #39021deborahdawuiMember
My site is down with the following error: syntax error, unexpected '<' in /home/content/41/10708941/html/wp-content/themes/lifestyle/functions.php on line 158
I had updated the child them function.php in the past with the following code snippet and it worked fine until today:
/** Customize the entire footer */
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'custom_footer' );
function custom_footer() {
?>
<p>© Copyright 2013 <a href="http://deborahdawui.com/">deborahdawui.com</a> · All Rights Reserved · <ahref="http://www.facebook.com/debdawui">Let's Connect On Facebook</a></p>
<?php
}Today, I went there to only update my facebook address and I got the error message. I don't know how to fix this. I found out that line 158 was: <p>© Copyright 2013 <a href="http://deborahdawui.com/">deborahdawui.com</a> · All Rights Reserved · <a
href="http://www.facebook.com/debdawui">Let's Connect On Facebook</a></p>
but it looks fine.
Please help because my entire site is down and not good for business. the worst of all is I can no longer access the function.php file. the error message displays whenever I click on any link
http://www.deborahdawui.comMay 3, 2013 at 2:49 am #39035sanjeevParticipantI just checked and looks like your site is still down....do you have FTP access, I would suggest to remove the error prone code from the function.php.....
You can download the function.php via ftp and delete the function and upload it so at least your site can work correctly.....
For the error, does all these spaces are there in function.php or it is just a typo here....
May 3, 2013 at 4:36 am #39053deborahdawuiMemberThanks a bunch Sanjeev. That helped! the white space appear after I paste the code snippet. Most likely a line break because the window isn't that wide to contain everything.
Now how can I add that portion of the snippet back the right way? Not familiar with PHP but I believe the opening tag <?php. is that what needs to be removed? do I keep ?> where it is right now or move it to the bottom since it's the ending tag. I'm not sure.
There is a note on the snippet page that says: Do not to copy the opening php tag in each snippet.
Here is my customized footer snippet
/** Customize the entire footer */
remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
add_action( ‘genesis_footer’, ‘custom_footer’ );
function custom_footer() {
?>
<p>© Copyright 2013 <a href=”http://deborahdawui.com/”>deborahdawui.com</a> · All Rights Reserved · <a href=”http://www.facebook.com/debdawui”>Let’s Connect On Facebook</a></p>
<?php
}thanks!
May 6, 2013 at 3:16 pm #39603deborahdawuiMemberHelp! I keep getting my function.php file corrupted and I don't know why. I tried downloading but i don't see the code that has added. Wha else is there to do?
May 6, 2013 at 3:49 pm #39608SusanModeratorIt looks like your double quotes are not rendering correctly - they may be rendering as curly quotes, rather than plain quotes. You will want to make sure you copy and paste the code snippet as plain text, with no formatting, otherwise you could easily bring your site down (as you have discovered).
The easiest solution is to remove the code snippet from your functions file to get your site back up and running, and then install the simple edits plugin. -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.