• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Editing functions.php file has crashed site!

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Editing functions.php file has crashed site!

This topic is: not resolved

Tagged: crash, error, functions.php

  • This topic has 15 replies, 4 voices, and was last updated 9 years, 3 months ago by liferightfoundation.
Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • October 29, 2013 at 4:47 pm #69764
    liferightfoundation
    Member

    Can 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
    Phil

    http://www.liferight.co.uk
    October 29, 2013 at 5:08 pm #69768
    RobG
    Member

    What 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/robgoss

    October 29, 2013 at 5:18 pm #69775
    liferightfoundation
    Member

    Hi 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 #69777
    RobG
    Member

    Do 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/robgoss

    October 29, 2013 at 5:22 pm #69778
    brook1979
    Member
    This reply has been marked as private.
    October 29, 2013 at 5:22 pm #69779
    liferightfoundation
    Member

    I 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 it

    October 29, 2013 at 5:26 pm #69783
    liferightfoundation
    Member

    Hi 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 #69785
    RobG
    Member

    When 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/robgoss

    October 29, 2013 at 5:35 pm #69786
    liferightfoundation
    Member

    Thanks Rob, I will give this a go now 🙂

    October 29, 2013 at 5:36 pm #69788
    brook1979
    Member
    This reply has been marked as private.
    October 29, 2013 at 5:39 pm #69789
    brook1979
    Member
    This reply has been marked as private.
    October 29, 2013 at 5:40 pm #69790
    liferightfoundation
    Member

    WONDERFUL!!
    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 day

    Phil

    October 29, 2013 at 5:43 pm #69791
    eamonmoriarty
    Participant

    Eamon Moriarty
    EM Dzine

    October 29, 2013 at 5:46 pm #69793
    eamonmoriarty
    Participant

    If 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 Dzine

    October 29, 2013 at 6:04 pm #69796
    RobG
    Member

    Make 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/robgoss

    October 29, 2013 at 6:18 pm #69802
    liferightfoundation
    Member

    Thanks again Rob 🙂
    Happy again!

  • Author
    Posts
Viewing 16 posts - 1 through 16 (of 16 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble