I know that this is a FAQ, and I know what's causing the problem, but I haven't come across a working solution. My site (www.eurocall-languages.org) has a RSS feed, and clicking on it I get the notorious error:
"error on line 3 at column 6: XML declaration allowed only at the start of the document"
The cause is two blank lines at the start of the doc. Googling and searching the Codex for this error comes up with various fixes, of which I've tried:
- editing the (child) theme functions.php to remove extraneous spaces
- putting the patch wejnswpwhitespacefix.php into the WordPress root and including it in index.php
- installing the plugin "Fix my RSS feed"
- sacrificing hamsters to the Dark Lord
All have failed. As a long-time PHP coder I know exactly what's causing the problem - some script is outputting blank lines before the feed - but I don't understand the WordPress 'ecosystem' well enough to figure out which.
So the question is: what is the best way to eradicate this problem? What script is causing it? I'm happy to hack the script if I know which one, but I don't want to go hacking blindly. It's also a very minor problem on which I've already spent an hour, and if there's no fix then my site users will just have to do without a RSS feed as there are far more important things to do.
And no, I'm not going to disable all my plugins and themes in turn. That's just a world of pain...
However, it would be nice to find a fix as I run other WordPress sites.