functions.php was accidentally edited, now broken

Community Forums Forums Design Tips and Tricks functions.php was accidentally edited, now broken

This topic is: not resolved

This topic contains 7 replies, has 3 voices, and was last updated by  nutsandbolts 9 months, 1 week ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #67736

    vapelation
    Participant
    Post count: 4

    Accidentally edited my functions.php file andI immediately deleted the row of code and saved using notepad++, but my site threw a parse error on line 3. Lines possibly effected:
    1. <?php//*
    2. /** Start the engine */
    3. require_once( TEMPLATEPATH . ‘/lib/init.php’ );

    Can’t figure out the issue, so I moved rows 2 and 3 down to 3 and 4, renamed the php file to functionstest.php and I can at least get back onto my site and admin dashboard. I tried renaming my theme and switching to twenty eleven, didn’t work. After getting the functions test.php to allow me back on my site, i tried refreshing all other files, but that doesn’t work I guess… Now warnings that Woocommerce is not integrated, but all my Woo info is there, and just updated Woo successfully, however, my home page is pretty much gone, no header, sidebar menus, slider, widgets, background, footer and everything is gone and that most custom.css and functions.php files are not working. Products pages are still in tact tho! Agency childs theme usually has custom options for background and header, but those options are now missing!! Using, win 7, chrome/firefox. I have not tried integrating Woo if it’s not necessary…I was originally trying to figure out why my custom.css was not working anymore, so after I all this I still need to figure out why i’m losing tweaks…and this is what happened. I really need someone to take a look at my site for me and help me figure this out… Unfortunately, I had a friend who did most of the set up and has abandoned me so i’m trying to learn, but I can’t get anywhere and this is my only means of income…store. Any help is appreciated!! Thanks!

    https://vapelation.com
    #67767

    braddalton
    Participant
    Post count: 8868

    Do you have a backup file?

    I would copy the broken file to your desktop and replace the file on your server with a new copy from a new download.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #67828

    vapelation
    Participant
    Post count: 4

    If I download a new copy will i lose all the changes created? I cannot redo those changes myself as I don’t know how he(my old website guy) did them. what i cannot understand is how pasting then deleting a line of code messed up the entire functions.php? Did you see anything wrong with the third row that would throw a parse error?
    As I said, I renamed the file and downloaded that to the server and at least i can get to my site, but it’s missing the entire homepage…
    I am still able to get to my product pages etc. even though i am getting a message stating that my theme is not integrated with Woocommerce…is that right?
    Thanks for your help,
    holley

    #67829

    vapelation
    Participant
    Post count: 4

    OH, and i don’t know how to replace the file with a new copy from a new download…

    #67832

    braddalton
    Participant
    Post count: 8868

    Simply upload it to your child themes root directory using FTP or File Manager in cPanel.

    Make sure you backup (download a copy) your entire child theme locally first.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #67864

    nutsandbolts
    Moderator
    Post count: 3104

    I’d be glad to take a look and try to help out if you’re still having trouble with this… Can you paste the contents of your entire functions.php into a post so we can see everything in it?


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

    #67943

    vapelation
    Participant
    Post count: 4

    Its not just the functions.php that is not working…originally I was trying to figure out why the custom.css was nolonger working and that’s when I screwed up the functions.php. Is there a way I could email you directly for help with this? I’m afraid that just pasting my functions.php will not help with everything that is broken and as you can tell, I don’t know enough about this to know what to do. I’d need someone to be able to have access to my FTP and dashboard…
    Could you help me with this? vapelation@gmail.com

    #67952

    nutsandbolts
    Moderator
    Post count: 3104

    Sure, no problem! I’ll send you an email.


    Andrea Whitmer, Owner, Nuts and Bolts Media
    I provide dev and training services for web designers • Find me on Twitter and Google+

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

You must be logged in to reply to this topic.