I just fixed one of the most confounding problems I’d ever come across on WordPress, so I’m sharing how I did it because I definitely couldn’t find the solution after weeks of trying.
See I was trying to get the valid XML feed for a particular Tag or Category from this blog, a process I’ve instigated on PLUG’s mailing list, so that the PLUG website can aggregate feeds tagged as ‘plug’ or ‘open source’ or ‘foss’ voluntarily submitted by its (currently 130+ strong) membership.
The problem was when I try to get the feed URL, for example:
I get this error:
XML Parsing Error: xml declaration not at start of external entity
Line Number 2, Column 1:
<?xml version=”1.0″ encoding=”UTF-8″?>
And there I found it. What looks like this:
should be like this:
In short, remove the spaces on line #9 on your wp-rss2.php. Now it’s validating. Check it here.
Can’t wait to apply it on the other sites. Basketball Exchange, in particular, has got XML errors up the wazoo.