WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] problem with theme (6 posts)

  1. davidspan
    Member
    Posted 7 years ago #

    I'm having a problem with a theme i created. when I change from my theme to another I get this error:
    Warning: Cannot modify header information - headers already sent by (output started at C:\xampplite\htdocs\wp-content\themes\cleanly\functions.php:1) in C:\xampplite\htdocs\wp-includes\pluggable.php on line 329

    here is my code in that file:

    <?php
    if(function_exists('register_sidebar'));
    register_sidebar(array('name'=>'sidebar1'));
    register_sidebar(array('name'=>'sidebar2'));
    ?>

    I have been over it with a fine...

    I had tried to uplad this them to the theme viewer, but it wouldn't work on there, thats when i found this bug... I'm not sure why this is happening and if it's why it will not work on the themeviewer or not...

  2. moshu
    Member
    Posted 7 years ago #

    themes\cleanly\functions.php:1)

    You should read the Codex before posting!
    http://codex.wordpress.org/Answers-Troubleshooting#Headers_already_sent
    See the Interpreting the Error Message section...

  3. davidspan
    Member
    Posted 7 years ago #

    yea read that,...checked that

    still getting error

  4. moshu
    Member
    Posted 7 years ago #

    Check it again.
    If you REALLY don't have a space at the very beginning of that functions.php file - deactivate all your plugins: something must insert that space there...

  5. whooami
    Member
    Posted 7 years ago #

    its either a space before the opening <.. or after the closing ?>

    Theres no ifs ands or buts about that, and its not a bug. Its called using the wrong editor :)

  6. davidspan
    Member
    Posted 7 years ago #

    Found problem file was encoded UFT-8 changed it to ANSI, seems to be working now. Thanks moshu

Topic Closed

This topic has been closed to new replies.

About this Topic