WordPress.org

Ready to get started?Download WordPress

Forums

function php registering sidebar dashboard goes blank (4 posts)

  1. pressorder
    Member
    Posted 4 years ago #

    I know this is my theme's fault, but because I want to keep it I need to fix it.
    I registered another sidebar in my theme and a few days later the following started happening:
    -when saving settings, updating posts, etc the page was redirected to blank page, also some visitors were welcome with blank page at the url
    -when the issue hasn't been fixed (obviously), the whole dashboard went blank as if programmed this way by our dear wordpress developers

    I am not great at coding my own WP themes, so I followed instructions on how to register a second sidebar, and pasted this code:

    <?php
    if ( function_exists('register_sidebars') )
    register_sidebars(2);
    ?>

    at the very end of the functions.php file.
    Is this a mistake? if yes, where should it be pasted at?

    When this theme is removed from my themes, the problem goes away, so the problem has been identified as existing with the theme.

    Any takers please?

  2. pressorder
    Member
    Posted 4 years ago #

    I narrowed down the problem to the functions.php file which caused all the dashboard problems.
    So one question remains: where do you include the above code to register the second sidebar so that i don't have the same problem again?
    Can you just put it anywhere in the file or is there a particular spot it belongs to?

  3. yairneumann11
    Member
    Posted 3 years ago #

    If you find out please let me know, I have the exact problem
    thnx

  4. DigitalSquid
    Member
    Posted 3 years ago #

    Check your functions.php file.

    Apart from the one you posted at the end is there already a register_sidebar() function there. If so, what does it say?

Topic Closed

This topic has been closed to new replies.

About this Topic