• I actually upgraded to 2.8.5, but not sure I checked it under 2.8.4.

    My issue is that WordPress fails validation by the W3C because before it outputs any of my custom theme, it sends a newline. The first line of my index.php file is get_header(), and the first line of header.php is my xml version statement. Viewing the source of the page, there’s a newline before the XML declaration, which is causing the failure.

    Any idea where this happens?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’d be sure there is absolutely no white space at the top of header.php, and that you’re using the correct text encoding in your text editor.

    Thread Starter homechicken

    (@homechicken)

    That was the first thing I looked at. My editor is vi. As I mentioned, the get_header() and xml statements are the very first line in each file.

    If you tick “Show Source” under options on the W3C validator, you’ll get line numbered source with the errors. Might be that the error isn’t at the very beginning of the file.

    Thread Starter homechicken

    (@homechicken)

    It definitely shows line one as blank, with my xml declaration as the second line. I disabled the plugins as well just to make sure they weren’t a problem–they weren’t.

    I eventually tracked it down to a newline that snuck in my custom theme’s functions.php page that coincided with my recent upgrade to either 2.8.4 or 2.8.5.

    Thanks for being a sounding board.

    Good you found it; I’ll have to remember that solution….

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘First line is a newline’ is closed to new replies.