Support » Fixing WordPress » Getting error: Warning: Cannot modify header information…

  • Resolved jstudios

    (@jstudios)


    I’ve read other posts about removing whitespace from the referenced file, but I didn’t find any whitespace that could be the culprit. This is on a fresh install of 3.6.1.

Viewing 9 replies - 1 through 9 (of 9 total)
  • We can’t see whitespace on a copy/paste of code – and that’s really too long to post here.

    What is the error you see?

    Thread Starter jstudios

    (@jstudios)

    Warning: Cannot modify header information – headers already sent by (output started at /home2/jstudios/public_html/jframe.jirehstudios.com/wp-content/themes/js-theme/jframe/jframe-options.php:1) in /home2/jstudios/public_html/jframe.jirehstudios.com/wp-includes/option.php on line 571

    Warning: Cannot modify header information – headers already sent by (output started at /home2/jstudios/public_html/jframe.jirehstudios.com/wp-content/themes/js-theme/jframe/jframe-options.php:1) in /home2/jstudios/public_html/jframe.jirehstudios.com/wp-includes/option.php on line 572

    And is this in relation to a plugin or a theme?

    Thread Starter jstudios

    (@jstudios)

    Ok, so I removed the “<style…” section i had at the beginning of the file because the link above says the file needs to start with <?php. Now it’s working.

    What’s the best way to include the styling in that file now?

    CSS should generally be in a .css file – it’s not meant to go in a .php file.

    Thread Starter jstudios

    (@jstudios)

    Ok, so how do I relate the css file with he php file? If I include it do I just echo the style tags?

    If you are trying to add CSS to your site, I’d suggest using a custom CSS plugin.

    If you want to add whole file, see:

    http://codex.wordpress.org/Function_Reference/wp_enqueue_style

    Thread Starter jstudios

    (@jstudios)

    Got it, I just registered and en-queued the stylesheet.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Getting error: Warning: Cannot modify header information…’ is closed to new replies.