• Hello everyone.
    I’m having this problem of header already sent. I already saw everything about that here but nothing worked. I know that the problem is on the line 1 of functions.php, but I checked and looked for blank spaces before and after the <?php , ?> but nothing was there. Can someone help me please!! The login page now is blank because of that!

    PHP Warning: Cannot modify header information – headers already sent by (output started at /home/itcloset/public_html/blog/wp-content/themes/stylismo/functions.php:1) in /home/itcloset/public_html/blog/wp-includes/pluggable.php on line 1121

    The line 1 of the function.php is:

    ?php
    if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'sidebar', 'before_widget' => '', 'after_widget' => '<br clear="all" />
    ', 'before_title' => '<div id="titulo-sidebar">', 'after_title' => '</div>
    ', ));
    register_sidebar(array( 'name' => 'blog', 'before_widget' => '', 'after_widget' => '<br clear="all" />
    ', 'before_title' => '<div id="titulo-sidebar">', 'after_title' => '</div>
    ', ));
    register_sidebar(array( 'name' => 'publicidade', 'before_widget' => '<div id="publicidade">', 'after_widget' => '</div>', 'before_title' => '', 'after_title' => '', ));
Viewing 2 replies - 1 through 2 (of 2 total)
  • Did you forget to paste the opening bracket of functions.php, or is the question mark actually the first character?

    Thread Starter julymorais

    (@julymorais)

    Sorry, I forgot. The correct is:

    <?php
    if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'sidebar', 'before_widget' => '', 'after_widget' => '<br clear="all" /><br />', 'before_title' => '<div id="titulo-sidebar">', 'after_title' => '</div><br />', ));
    register_sidebar(array( 'name' => 'blog', 'before_widget' => '', 'after_widget' => '<br clear="all" /><br />', 'before_title' => '<div id="titulo-sidebar">', 'after_title' => '</div><br />', ));
    register_sidebar(array( 'name' => 'publicidade', 'before_widget' => '<div id="publicidade">', 'after_widget' => '</div>', 'before_title' => '', 'after_title' => '', ));
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error: PHP Warning: Cannot modify header information – headers already sent by’ is closed to new replies.