Support » Fixing WordPress » register_sidebar in functions.php causing blank page.

  • My issue seems to be with the register_sidebar function inside my functions.php file. If I remove register_sidebar from functions.php, my pages begin to load correctly, except now I have no widgets.

    I added register_sidebar so that I could widgetize my theme, yet it is breaking my site.

    This is what my functions.php file looks like:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Would anyone happen to know why this is happening?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You need to use register_sidebars(1); not register_sidebar()

    See here!



    Thanks for the attempt. I tried both:

    if (function_exists('register_sidebars'))

    as well as

    if (function_exists('register_sidebars'))

    Any other suggestions?

    Moderator, my apologies for not using pastebin before, therefore, here is the pastebin code if anyone would like to help me out:

    To clear up my issue. It can easily be replicated by going to as opposed to just

    If the ‘www’ is introduced, the site does not work. It can also be replicated by going to and clicking on the links. You will get a blank page. This is also occuring from inside wp-admin. Any change I make in wp-admin takes me to a blank page and I need to do a page refresh.

    Note: This ONLY happens with the register_sidebars() code in functions.php. If it is removed, the problem seizes.



    I reverted back to using the functions.php file from inside the twentyten theme. Unless someone has an idea why my functions.php file was wigging out, Ill keep the other function.php file.



    1. Backup/rename existing functions.php file.
    2. On your computer, create a new functions.php file
    3. Copy your existing code to the new file and re-upload via FTP

    I encounter this sometimes with functions.php or other theme template files and doing this works for me.

    Hi Leo,
    In functions.php we do not close the <?php tag it is left open, check the twenty ten functions.php

    In other files we always close the php tags <?php //Do something ?>


     if (function_exists('register_sidebars')) register_sidebars(1);
    if (!is_admin() && !current_user_can('add_users')){
        wp_deregister_script( 'admin-bar' );
        wp_deregister_style( 'admin-bar' );



Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘register_sidebar in functions.php causing blank page.’ is closed to new replies.