• 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

Unable to edit functions.php

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 › Unable to edit functions.php

This topic is: not resolved

Tagged: unable to edit functions.php

  • This topic has 22 replies, 5 voices, and was last updated 11 years, 9 months ago by Gemini55.
Viewing 20 posts - 1 through 20 (of 23 total)
1 2 →
  • Author
    Posts
  • December 8, 2014 at 3:29 am #133963
    Gemini55
    Participant

    I have genesis and copyblogger 2 theme

    I had this issue a few months ago and it happened again yesterday when trying to edit the functions.php file.

    Basically I am unable to edit the functions.php file.

    If I try to edit it and update the file - the edit fails and it crashes the whole website leaving a 'white space' - and the only way to rectify the problem is to do a complete backup from a previous time.

    I am sure the functions.php should be editable - can you advise what the problem could be and how to resolve it?

    https://www.londontheatre1.com
    December 8, 2014 at 5:10 am #133971
    Pixel Frau
    Member

    Is WordPress crashing while saving the edited file, or is the site not working after you've made changes and saved functions.php? If you've entered code incorrectly in functions.php, it often results in the site not working or coming up as a blank white page.

    I'd suggest editing the file via FTP. Download the existing functions.php file. Open the file in a text editor on your computer and make the changes. Then upload the revised file via FTP.

    December 8, 2014 at 10:16 am #133989
    Gemini55
    Participant

    The small snippet of code I added shouldn't have made any real difference... but once the file is saved it crashes everything and I am then unable to access the functions.php to remove or edit again - in fact unable via wordpress login to access anything.

    I haven't tried it but I think if I were to simply save the functions.php without adding anything it would probably crash everything.

    December 8, 2014 at 10:35 am #133991
    Pixel Frau
    Member

    Just one wrong or missing character in functions.php can crash a site. Since you are able to save the changes in functions.php, but not access the site after saving, I would guess that there is an error in the code you're adding. Why don't you paste it here so people can take a look for you.

    December 8, 2014 at 11:29 am #133994
    Gemini55
    Participant

    Hi, it is not so much that it crashes the website it is the subsequent inability to put the functions.php back to how it was and restore everything.

    The code that was added was from http://my.studiopress.com/snippets/post-meta/

    <?php
    //* Do NOT include the opening php tag

    //* Remove the post meta function
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );

    December 8, 2014 at 11:44 am #133995
    zubird
    Member

    Did you remove the opening <? php tag as the comment suggests?

    Add this to the functions.php file:

    //* Remove the post meta function
    remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );

    Not this:
    <?php
    //* Do NOT include the opening php tag

    //* Remove the post meta function
    remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ );

    Also, if you are editing through WP, you can sometimes hit your back button, remove the offending code and save it again to restore it. Or, if you are using ftp or an application like Dreamweaver, simply remove the offending code, then upload that functions file again. Refresh your browser and you should be back in business.

    In other words, you should not have to do a complete restore, just restore the functions.php file.

    December 8, 2014 at 11:51 am #133996
    Gemini55
    Participant

    This is what was added:

    //* Remove the post meta function
    remove_action( ‘genesis_after_post_content’, ‘genesis_post_meta’ )

    December 8, 2014 at 12:07 pm #133997
    Pixel Frau
    Member

    It's missing the semicolon on the end.

    December 8, 2014 at 12:13 pm #133998
    Gemini55
    Participant

    sorry that was my copying and pasting into here:

    The following was added:

    //* Remove the post meta function
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );

    My point is not so much that whatever code is added it is the subsequent crashing and being unable to rectify it. ie. unable to remove any code and save as it was before. I have never known this before with a functions.php

    I haven't tried it but I wonder if it would crash simply by clicking on the update button - I am VERY reluctant to do this as it would crash the site again.

    December 8, 2014 at 6:30 pm #134033
    marybaum
    Participant

    I believe you have a plugin conflict.

    I cannot urge you strongly enough to take Julia's advice about editing code on your local machine and then uploading it with FTP - she or I can help you set up a local environment for that, or you can just use a text editor (TextEdit or NotePad, depending) and an FTP client (there are lots of perfectly good free ones.)

    To find your problem, we do what I call The Dance. Other folks call in a binary something-something, but I've been calling it The Dance for nigh-on 30 years -- we used to use it to fix problems with Macs, back in the day.

    But first, you need that FTP client - and the FTP credentials to log in to your site. Those are probably in the email you got when you bought your hosting, assuming you did. If you had a developer or a relative do it, ask that person for that info.

    (Keep it in a safe place. My veterinarian didn't have his, then his developer died. The hosting co is not exactly helping.)

    This is important, because the only way to fix your problem is to reproduce it on purpose.

    The basic process, then, is this - you'll log in to your site via FTP and see a list of folders - in the one called wp-content, there will be a folder called plugins.

    You will create a new folder called Old Plugins, then move half the plugins from the Plugins folder into the Old Plugins folder.

    Now log in to your back end as usual and try to edit something in your editor window. If everything is wonderful, you know the offending plugin is in the bunch you just removed. If the site crashes, you know the problem is in the half that are still active.

    Now take half the plugins in whichever folder has the problem and add it to the folder that probably doesn't - repeat the process.

    Eventually you should get down to a single plugin that you know is the bad one. Nuke it and find a replacement if you need whatever it does.

    Hope that helps!


    Sharing the good news about the wonders of modern CSS and the split-step. Either one should get you moving fast. 😀

    December 8, 2014 at 7:17 pm #134035
    Gemini55
    Participant

    Brilliant Mary - that makes sense Many many thanls! 🙂

    I am on to it and am setting up a local installation 🙂

    I have all ftp settings etc.

    December 10, 2014 at 7:55 am #134159
    Gemini55
    Participant

    I am trying to set up WordPress and theme on my 'local' computer but seem to be having a problem adding functions.php file to new theme folder...

    I have downloaded Genesis and installed wordpress - no problem and all works

    I create new theme folder and name it.... and also add an image to it.. and copy original style sheet across and teh theme appears in the Themes section of wordpress no problem...

    Question: What other files do I need to add in the new theme folder? (if any)

    I think it is the functions.php -

    I have tried copying the functions.php and and when I do that cause a problem... I get a 'white screen' and only when I remove the functions.php from the new theme folder does it all work again

    Question: Should I add the functions.php to the new theme folder or not? And IF so How?

    December 10, 2014 at 8:12 am #134162
    Pixel Frau
    Member

    If you're following Mary's advice, you'll want to copy everything from the theme folder.

    December 10, 2014 at 8:33 am #134165
    Gemini55
    Participant

    I have tried that Pixel but the theme just crashes.... when I go to view a post for example... in fact I cannot even login (white screen)

    If I copy EVERYTHING from the genesis folder into new theme folder I cannot even login on the WP panel... but as soon as I remove the functions.php I am able to...

    December 10, 2014 at 8:35 am #134166
    Pixel Frau
    Member

    And have you renamed the plugins folder like Mary suggested?

    December 10, 2014 at 9:23 am #134190
    Gemini55
    Participant

    I am doing this on a fresh local install so there are no plugins...

    December 10, 2014 at 9:28 am #134191
    Pixel Frau
    Member

    Then there must be something wrong with the code in functions.php. Try using the original theme files.

    December 10, 2014 at 9:30 am #134192
    Gemini55
    Participant

    I am...

    December 10, 2014 at 9:38 am #134194
    Pixel Frau
    Member

    From what you've said, it sounds like you've copied the theme as is from your existing installation. You've also said that you've made some changes to it.

    So try installing the original theme—as directly downloaded from StudioPress.

    December 10, 2014 at 9:51 am #134197
    Gemini55
    Participant

    I have downloaded directly from Studiopress - files directly on to my computer - simply trying to get its started and create a child theme...

  • Author
    Posts
Viewing 20 posts - 1 through 20 (of 23 total)
1 2 →
  • 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

© 2026 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