Title: RSS Feed Error
Last modified: August 19, 2016

---

# RSS Feed Error

 *  Resolved [yakattak](https://wordpress.org/support/users/yakattak/)
 * (@yakattak)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/)
 * I can’t really place when this happened, or if I installed something then it 
   stopped working, but I have been getting the following error on my RSS feed page:
   [http://yakattakstudios.com/?feed=rss2](http://yakattakstudios.com/?feed=rss2)
 * I have no idea what file to edit nor would I have any idea how to fix it if I
   knew the file. Any thoughts?
 * Thanks in advance

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/#post-1246530)
 * Hi
 * Validating your RSS feed shows this code appearing before the XML line, which
   must be the first line
 *     ```
       <html>
       <head>
       <meta name="verify-v1" content="yQJe1X+MxwKRqMpkLMvIT0Am4MyRvqhpjrwbH6mV74c=" />
       </head>
       </html>
       ```
   
 * Do a View Source on your home page – you will see those same lines appearing 
   on your live website, before the DOCTYPE declaration.
 * You need to find out where they are coming from and remove them. When you get
   it clean on the live site, that should also clean up the feed problem. Start 
   with your theme’s header.php, but it could be coming from elsewhere.
 *  Thread Starter [yakattak](https://wordpress.org/support/users/yakattak/)
 * (@yakattak)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/#post-1246557)
 * Oh, that’s from the Google Sitemap verification I believe. I know where to start
   and will try it out.
 * Thanks
 *  Thread Starter [yakattak](https://wordpress.org/support/users/yakattak/)
 * (@yakattak)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/#post-1246559)
 * Okay, I removed the meta tag from index.php and that line has gone away from 
   the source, however, it just moved the line that the error was on up one, but
   on that line I see nothing wrong with it =/.
 * Anymore ideas?
 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/#post-1246561)
 * Which index.php did you edit, the main WordPress one or your theme’s one? **Never**
   edit the main WordPress index.php, and if you did, use FTP to replace it with
   a freshly downloaded copy from WordPress.
 *  Thread Starter [yakattak](https://wordpress.org/support/users/yakattak/)
 * (@yakattak)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/#post-1246563)
 * > Which index.php did you edit, the main WordPress one or your theme’s one? Never
   > edit the main WordPress index.php, and if you did, use FTP to replace it with
   > a freshly downloaded copy from WordPress
 * I edited the main one, and I replaced it, yet same issue.
 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/#post-1246564)
 * Replacing the main index.php got rid of the bad code atop your feed and blog 
   pages, but you still have a different error in your feed:
 * `<b>Fatal error</b>: Call to undefined function the_content_feed() in <b>D:\Hosting\
   4617680\html\wp-includes\feed-rss2.php</b> on line <b>49</b><br />`
 * My own feed-rss2.php doesn’t have the_content_feed() in it, so unless you or 
   a plugin added it, I’m not sure where this is coming from.
 *  Thread Starter [yakattak](https://wordpress.org/support/users/yakattak/)
 * (@yakattak)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/#post-1246576)
 *     ```
       <?php
       /**
        * RSS2 Feed Template for displaying RSS2 Posts feed.
        *
        * @package WordPress
        */
   
       header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
       $more = 1;
   
       echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
   
       <rss version="2.0"
       	xmlns:content="http://purl.org/rss/1.0/modules/content/"
       	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
       	xmlns:dc="http://purl.org/dc/elements/1.1/"
       	xmlns:atom="http://www.w3.org/2005/Atom"
       	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
       	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
       	<?php do_action('rss2_ns'); ?>
       >
   
       <channel>
       	<title><?php bloginfo_rss('name'); wp_title_rss(); ?></title>
       	<atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
       	<link><?php bloginfo_rss('url') ?></link>
       	<description><?php bloginfo_rss("description") ?></description>
       	<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
       	<?php the_generator( 'rss2' ); ?>
       	<language><?php echo get_option('rss_language'); ?></language>
       	<sy:updatePeriod><?php echo apply_filters( 'rss_update_period', 'hourly' ); ?></sy:updatePeriod>
       	<sy:updateFrequency><?php echo apply_filters( 'rss_update_frequency', '1' ); ?></sy:updateFrequency>
       	<?php do_action('rss2_head'); ?>
       	<?php while( have_posts()) : the_post(); ?>
       	<item>
       		<title><?php the_title_rss() ?></title>
       		<link><?php the_permalink_rss() ?></link>
       		<comments><?php comments_link(); ?></comments>
       		<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
       		<dc:creator><?php the_author() ?></dc:creator>
       		<?php the_category_rss() ?>
   
       		<guid isPermaLink="false"><?php the_guid(); ?></guid>
       <?php if (get_option('rss_use_excerpt')) : ?>
       		<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
       <?php else : ?>
       		<description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
       	<?php if ( strlen( $post->post_content ) > 0 ) : ?>
       		<content:encoded><![CDATA[<?php the_content_feed('rss2') ?>]]></content:encoded>
       	<?php else : ?>
       		<content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
       	<?php endif; ?>
       <?php endif; ?>
       		<wfw:commentRss><?php echo get_post_comments_feed_link(null, 'rss2'); ?></wfw:commentRss>
       		<slash:comments><?php echo get_comments_number(); ?></slash:comments>
       <?php rss_enclosure(); ?>
       	<?php do_action('rss2_item'); ?>
       	</item>
       	<?php endwhile; ?>
       </channel>
       </rss>
       ?>
       ```
   
 * There is the code for my feed-rss2.php in Includes.
 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/#post-1246580)
 * Your feed-rss2.php is not the same as the one that comes with WordPress 2.8.4.
   Replace it with a feshly downloaded copy.
 * If that does not work, you may wish to manually reupgrade to 2.8.4 since your
   prior upgrade may have failed to replace all old files.
 * [http://codex.wordpress.org/Upgrading_WordPress_Extended](http://codex.wordpress.org/Upgrading_WordPress_Extended)
 *  Thread Starter [yakattak](https://wordpress.org/support/users/yakattak/)
 * (@yakattak)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/#post-1246603)
 * Thanks, fixed it by uploading the RSS files again.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘RSS Feed Error’ is closed to new replies.

## Tags

 * [RSS](https://wordpress.org/support/topic-tag/rss/)
 * [xml](https://wordpress.org/support/topic-tag/xml/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 3 participants
 * Last reply from: [yakattak](https://wordpress.org/support/users/yakattak/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/rss-feed-error-21/#post-1246603)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
