• 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

Site broken after Genesis Custom Code edit

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 › Design Tips and Tricks › Site broken after Genesis Custom Code edit

This topic is: not resolved
  • This topic has 12 replies, 4 voices, and was last updated 13 years ago by webmonkey.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • April 25, 2013 at 6:13 pm #37752
    webmonkey
    Participant

    My Prose site is broken after a bad PHP edit to the Custom Functions section of Custom Code (is this added by Genesis or Jetpack?) in the Genesis menu:
    HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
    Where does one find the data that this file stores, to delete the problematic PHP, and thus restore the site? I searched the entire SQL file with no sign of any of the content.

    April 25, 2013 at 8:48 pm #37769
    AnitaC
    Keymaster

    You may want to check with your host about the 500 error. Or, you can use FTP and upload the original Function file back to your hosting account.


    Need help with customization or troubleshooting? Reach out to me.

    April 26, 2013 at 1:56 am #37797
    Brad Dalton
    Participant

    Yep. Just upload a new file from a fresh download of the Prose theme. Hope you have backup or you may a want to download the problem file locally.

    I get these errors dozens of times a day testing code. No big deal


    Tutorials for StudioPress Themes.

    April 28, 2013 at 12:31 pm #38245
    webmonkey
    Participant

    Prose doesn't store its Custom Code in the functions.php but it must store it somewhere.

    April 28, 2013 at 12:35 pm #38247
    Brad Dalton
    Participant

    lib/structure/custom.php


    Tutorials for StudioPress Themes.

    April 28, 2013 at 12:36 pm #38248
    webmonkey
    Participant

    This is what's in the Prose functions.php file

    `<?php
    /*
    WARNING: DO NOT edit this file under any circumstances.
    Please do all PHP modifications via the Custom Code admin menu.
    */

    /**
    * This file calls the init.php file for both Genesis and Prose.
    *
    * It initializes the Genesis framework, and loads the Prose library as well.
    *
    * This file is a core Prose file and should not be edited.
    *
    * @author StudioPress
    * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
    * @link http://www.studiopress.com/themes/genesis
    */

    /** Start the engine */
    require_once( get_template_directory() . '/lib/init.php' );
    require_once( get_stylesheet_directory() . '/lib/init.php' );

    prose_create_custom_php();`

    Uploading a new one doesn't change anything. I searched the SQL database for words I knew were in there, but no luck. So where is Prose/Genesis storing the Custom Code you can add through the Genesis menu.

    April 28, 2013 at 12:43 pm #38250
    Brad Dalton
    Participant

    You need to upload this file custom.php

    which is located here lib/structure/custom.php

    Send me your login details for cPanel and i'll fix it.


    Tutorials for StudioPress Themes.

    April 28, 2013 at 12:50 pm #38252
    webmonkey
    Participant

    Doesn't make any difference. That file doesn't store content either:

    `<?php
    /**
    * This file controls the creation and inclusion of the custom.php file.
    *
    * @package Prose
    * @author StudioPress
    * @since 1.5.0
    */

    /**
    * Return the full path to the custom.php file for editing and inclusion.
    *
    * @uses prose_get_stylesheet_location()
    *
    * @since 1.5.0
    *
    */
    function prose_get_custom_php_path() {

    return prose_get_stylesheet_location( 'path' ) . 'custom.php';

    }

    /**
    * Helper function that will create custom.php file, if it does not already exist.
    *
    * @uses prose_get_custom_php_path()
    *
    * @since 1.5.0
    *
    */
    function prose_create_custom_php() {

    if ( file_exists( prose_get_custom_php_path() ) )
    return;

    $handle = @fopen( prose_get_custom_php_path(), 'w' );
    @fwrite( $handle, stripslashes( "<?php\n/** Do not remove this line. Edit functions below. */\n" ) );
    @fclose( $handle );

    }

    /**
    * Helper function that will create custom.php file, if it does not already exist.
    *
    * @uses prose_get_custom_php_path()
    *
    * @since 1.5.0
    *
    */
    function prose_edit_custom_php( $text = '' ) {

    /** Create file, if it doesn't exist */
    if ( ! file_exists( prose_get_custom_php_path() ) )
    prose_create_custom_php();

    /** Now that it exists, write text to that file */
    $handle = @fopen( prose_get_custom_php_path(), 'w+' );
    @fwrite( $handle, stripslashes( $text ) );
    @fclose( $handle );

    }

    add_action( 'after_setup_theme', 'prose_do_custom_php' );
    /**
    * PHP require the custom.php file, if it exists.
    *
    * @uses prose_get_custom_php_path()
    *
    * @since 1.5.0
    *
    */
    function prose_do_custom_php() {

    if ( ! is_admin() && file_exists( prose_get_custom_php_path() ) )
    require_once( prose_get_custom_php_path() );

    }`

    April 28, 2013 at 5:08 pm #38309
    wendycholbi
    Member

    Prose stores its custom code in wp-content/uploads/prose/ .

    Look for the custom.php file in that directory (you may also see custom.css, settings.css, and minified.css). In its pristine unedited state, the only contents of that file should be:

    
    <?php
    /** Do not remove this line. Edit functions below. */

     


    I love WordPress, Genesis, and the Prose child theme (my complete guide to using Prose is here: SiteSetupKit.com). Say hi on Twitter: @wendycholbi

    April 29, 2013 at 12:45 am #38357
    Brad Dalton
    Participant

    Sorry my mistake. Prose is a little different to other themes.


    Tutorials for StudioPress Themes.

    April 29, 2013 at 2:59 pm #38464
    webmonkey
    Participant

    Wendy you rock. The custom code file is found here: /wp-content/uploads/prose/custom.php

    Brad, thanks for chipping in!

    April 29, 2013 at 7:24 pm #38487
    wendycholbi
    Member

    Glad to help. Sounds like you got your site back up, then? (Hooray!)


    I love WordPress, Genesis, and the Prose child theme (my complete guide to using Prose is here: SiteSetupKit.com). Say hi on Twitter: @wendycholbi

    April 30, 2013 at 12:06 pm #38601
    webmonkey
    Participant

    Yes, it's all win now:
    http://66.147.244.62/~grapefr3/

    Thanks. 🙂

  • Author
    Posts
Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘Design Tips and Tricks’ 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