WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Changed the functions.php and now my blog is blank.

[Resolved] Changed the functions.php and now my blog is blank.

  • I’m new to codes and blogging. I simply wanted to get an extra sidebar. I went into functions.php and made a little change and now my blog is blank. Can’t even log in. Please tell me I will see everything in my blog again. 🙁

    Here is the code I made changes to:
    /**
    * Register our sidebars and widgetized areas.
    *
    * uses register_sidebar
    * returns the id
    */
    if ( function_exists( ‘register_sidebar’ ) ) {
    register_sidebar ( ( array(
    ‘name’ => __( ‘sidebar’, ‘simplecatch’ ),
    ‘id’ => ‘sidebar’,
    ‘description’ => __( ‘sidebar’, ‘simplecatch’ ),
    ‘before_widget’ => ‘<div class=”widget”>’,
    ‘after_widget’ => ‘</div>’,
    ‘before_title’ => ‘<h3>’,
    ‘after_title’ => ‘</h3><hr/>’
    ) );
    }
    ?>

    I’m using the simplecatch theme. 🙁

Viewing 15 replies - 1 through 15 (of 19 total)
  • Are you running a Child Theme?

    Do you have FTP access?

    When I have had that kind of trouble, I restored the changed file and all was well again.

    I don’t know how to run a child theme.

    and I’m just barely trying to set up the ftp thing.

    I’m clueless 🙁

    You can just try to remove the code block that you changed inside functions.php to see if it comes back. Then ask for another support to add a sidebar.

    Just four months ago, I had never even heard of FileZilla.

    You will get your site back by putting an original copy of functions.php back in by overwriting the one you have changed. There is more than one way to do that, but FTP is probably the simplest. Download a new copy of your theme to somewhere on your own computer, then copy/replace its functions.php into your current theme folder. After you get things running again, you will find it is much easier to make a Child Theme than what you are facing right now.

    You mean the code I just posted here? Remove all of that?

    Yes, just cut it out and put it in a plain text file in your local computer.

    I cut it out. It’s still the same. Can’t log in. Blank page.

    I have filezilla up and running but I have no idea how to connect.

    Do you have your login info for your server?

    You will possibly have to tell FileZilla to show hidden files, not sure there.

    Look for your wp-content folder. You theme should be inside a “themes” folder in there. After you locate functions.php inside your theme folder, upload and overwrite it with a default one. Trying to re-edit the file already there will require a proper editor, and I use Notepad++. Also, be sure to never have or leave any space or line break at the close of a .php file.

    finally got into filezilla. i found where it says admin-functions.php and uploaded the recently installed simple catch functions php

    how do i overwrite?

    WPyogi

    @wpyogi

    Forum Moderator

    Admin-functions is not the same as functions.php.

    Download a new copy of your theme to your local computer. Then using Filezilla, upload and replace the functions file that you changed inside the simple catch themes folder. See if that allows you to login again.

    i found where it says admin-functions.php and uploaded the recently installed simple catch functions php

    how do i overwrite?

    You were in the wrong place, and it sounds like you are fortunate.

    Do what WPyogi just said.

    Edit: Filezilla will ask you for confirmation to overwrite when you upload if you are where you need to be.

    yes it did ask about overwriting and i clicked ok. I checked my blog and it’s still blank. is there something else i need to do?

    If the functions.php file is the only file you had altered, putting it back to its original state is all I know. So, sit tight and wait for an expert to come around…

    maybe i installed the wrong version of my theme? could that be why?

    Since I know nothing about your theme, I dare not comment there…and you might want to post that question here:
    http://wordpress.org/support/theme/simple-catch

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Resolved] Changed the functions.php and now my blog is blank.’ is closed to new replies.
Skip to toolbar