/ Published in: XML
Allows you to remove the whitespace that can appear before the xml tag in wordpress files such as wp-includes/feed-rss2.php
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// find these lines in the php file (ie, feed-rss2.php) header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); $more = 1; // immediately add these 3 lines after $out = ob_get_contents(); $out = str_replace(array("\n", "\r", "\t", " "), "", $input); ob_end_clean();
URL: http://www.w3it.org/blog/wordpress-feed-error-output-solution-how-to/