Home » Posts tagged "rss feed error fix"

How to: Fix XML Parsing Error of WordPress Feed

wordpress-xml-feed-error

AIM– “To fix error on line 2 at column 6: XML declaration allowed only at the start of the document”

Scenario – WordPress Feeds

Situation – Error

Symptom –  Due to whitespace before the beginning line of xml feed.

Problem – Either due to extra space after closing tag ?> in functions.php of your WordPress theme file.

Simple Fix (1 hour fix)- Try deactivating your theme and check your blog.com/rss  for no more errors. If no error then theme is causing you the problem. So either find the whitespace in your php file and remove it. If it it not in functions.php, the error might be from any of the theme files.

Very very simple fix (1 minute fix)Add the following code to your functions.php of your theme.


function ___juniorhero_wp_whitespace_fix($input) { /* valid content-type? */ $allowed = false; <span

READ MORE