Community Forums › Forums › Archived Forums › General Discussion › Editing functions.php file has crashed site!
Tagged: crash, error, functions.php
- This topic has 15 replies, 4 voices, and was last updated 11 years, 3 months ago by
liferightfoundation.
-
AuthorPosts
-
October 29, 2013 at 4:47 pm #69764
liferightfoundation
MemberCan someone please help urgently....
I followed the instruction on the StudioPress site to add footer widgets to our purchased 'Freelance' theme (against my better judgement), however it has now crashed the site, displaying the following error on each page
Much against my better judgement I tried to edit the functions.php file of Freelance to add footer widgets. I followed the instruction on the Studiopress website and it has crashed our website, displaying the following error...
Parse error: syntax error, unexpected '<' in /homepages/3/d376264096/htdocs/hold/wp-content/themes/freelance/functions.php on line 45
Can anyone please help ASAP, as our site is now down.
Thank you
http://www.liferight.co.uk
PhilOctober 29, 2013 at 5:08 pm #69768RobG
MemberWhat code did you add to your function.php file?
To speed up the process please post the link to the website in question.
We recommend using Firebug to view source codes http://getfirebug.com/
RobGoss WordPress Developer
We build WordPress websites for your business or personal goals
http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgossOctober 29, 2013 at 5:18 pm #69775liferightfoundation
MemberHi Rob
Added it from this page http://my.studiopress.com/tutorials/add-footer-widgets/<?php
//* Do NOT include the opening php tag//* Add support for 4-column footer widgets
add_theme_support( 'genesis-footer-widgets', 4 );Can't get into the site at all now... not even to edit it 🙁
I am a novice (obviously)!
October 29, 2013 at 5:20 pm #69777RobG
MemberDo you know how to edit your WordPress website using your cpanel?
To speed up the process please post the link to the website in question.
We recommend using Firebug to view source codes http://getfirebug.com/
RobGoss WordPress Developer
We build WordPress websites for your business or personal goals
http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgossOctober 29, 2013 at 5:22 pm #69778brook1979
MemberThis reply has been marked as private.October 29, 2013 at 5:22 pm #69779liferightfoundation
MemberI don't Rob, no. (but happy to learn!)
I don't use cpanel with this website... I can use an ftp programme to edit the .php file in textedit....
Thank you for your help. I really appreciate itOctober 29, 2013 at 5:26 pm #69783liferightfoundation
MemberHi Brook.
I did delete it... i took out everything I added and saved the file, but the error still remained. I restored it to how it was but the error didn't go 🙁October 29, 2013 at 5:34 pm #69785RobG
MemberWhen I have trouble like this I always correct it using my cpanel, You need to access your Function.php and just remove the codes you place in it. It looks as tho you added part of the codes that was not needed.
If you added the footer code as so with the <?php
//* Do NOT include the opening php tag this is incorrect.<?php //* Do NOT include the opening php tag //* Add support for 4-column footer widgets add_theme_support( ‘genesis-footer-widgets’, 4 );
You should have added it as so.
//* Add support for 4-column footer widgets add_theme_support( ‘genesis-footer-widgets’, 4 );
If you notice with this StudioPress snippet it's telling you Do NOT include the opening php tag,
Same goes for the rest of this footer snippet. You have 2 choices, remove all the newely added codes or just correct it and save your new changes.
To speed up the process please post the link to the website in question.
We recommend using Firebug to view source codes http://getfirebug.com/
RobGoss WordPress Developer
We build WordPress websites for your business or personal goals
http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgossOctober 29, 2013 at 5:35 pm #69786liferightfoundation
MemberThanks Rob, I will give this a go now 🙂
October 29, 2013 at 5:36 pm #69788brook1979
MemberThis reply has been marked as private.October 29, 2013 at 5:39 pm #69789brook1979
MemberThis reply has been marked as private.October 29, 2013 at 5:40 pm #69790liferightfoundation
MemberWONDERFUL!!
Thank you Rob (and Brook) for your kind help. It is now working AND I have the footers as originally planned...Your help is greatly appreciated
Have a great dayPhil
October 29, 2013 at 5:43 pm #69791eamonmoriarty
Participant
Eamon Moriarty
EM DzineOctober 29, 2013 at 5:46 pm #69793eamonmoriarty
ParticipantIf you have access to your site through FTP you could download the malfunctioning functions.php file to your computer so that you can edit it locally.
Make sure that you added the code correctly. Did you follow the instruction: //* Do NOT include the opening php tag? (<?php)
If you did include it, remove it, save the file and upload.Check to see if your site is restored.
If not you could find the original functions.php from your Freelance theme and upload it to replace the malfunctioning file.
This should restore your site to its original state before you made the edits.It would be wise to backup your site first.
Sorry, you can ignore this as I see you have solved the problem.
Eamon Moriarty
EM DzineOctober 29, 2013 at 6:04 pm #69796RobG
MemberMake sure you keep a fresh backup as offten as possible. Glad you resolve d it.
To speed up the process please post the link to the website in question.
We recommend using Firebug to view source codes http://getfirebug.com/
RobGoss WordPress Developer
We build WordPress websites for your business or personal goals
http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgossOctober 29, 2013 at 6:18 pm #69802liferightfoundation
MemberThanks again Rob 🙂
Happy again! -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.