I have been having a lot of the same problem lately on almost all of my blogs: the RSS feed would stop to work on WordPress. I proudly use WordPress, which is the greatest CMS I have ever used, and I enjoy its features and community. But this problem was really getting on my nerves, and a lot of people seemed to have no solution to that.
I was having this error:
XML Parsing Error: XML or text declaration not at start of entity
The support forums on WordPress.org had some suggestions:
- Check your theme’s functions.php file for blank lines outside of <? and ?> bracketed section (actually, I had to manually check many files: wp-config.php, wp-settings.php, wp-rss.php, wp-rss2.php, wp-feed.php, wp-atom.php).
- Use the fix-rss-feed plugin (that did a lot of mess in my files, leaving behind lots of backup junk, but did not correct the problem).
Then, I found this solution, which worked perfectly for me: WordPress leading whitespace fix. You just have to place the file in the root directory of your blog, and edit the index.php file there to include it.
This is but a temporary solution, as WordPress will overwrite index.php at the next upgrade, but it’s not very time-consuming to put it back in place afterwards. I wish someone would find a way to make this into a plugin, so that it would be included automatically.
Do you have the same problem? What solutions, if any, did you find? Please share in the comment section.
