Error message in child theme

Community Forums Forums General Discussion Error message in child theme

This topic is: not resolved

This topic contains 4 replies, has 3 voices, and was last updated by  Susan 1 year, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #39021

    deborahdawui
    Participant
    Post count: 4

    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>&copy; Copyright 2013 <a href=”http://deborahdawui.com/”>deborahdawui.com</a> &middot; All Rights Reserved &middot; <a

    href=”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>&copy; Copyright 2013 <a href=”http://deborahdawui.com/”>deborahdawui.com</a> &middot; All Rights Reserved &middot; <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

    • This topic was modified 1 year, 5 months ago by  deborahdawui.
    • This topic was modified 1 year, 5 months ago by  deborahdawui.
    http://www.deborahdawui.com
    #39035

    sanjeev
    Participant
    Post count: 34

    I 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….


    Meet me at: Make Web World

    #39053

    deborahdawui
    Participant
    Post count: 4

    Thanks 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>&copy; Copyright 2013 <a href=”http://deborahdawui.com/”>deborahdawui.com</a> &middot; All Rights Reserved &middot; <a href=”http://www.facebook.com/debdawui”>Let’s Connect On Facebook</a></p>
    <?php
    }

    thanks!

    #39603

    deborahdawui
    Participant
    Post count: 4

    Help! 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?

    #39608

    Susan
    Moderator
    Post count: 9251

    It 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.


    Susan @ Graphically Designing I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.