Title: Invalid feed, blank lines, function.php
Last modified: August 19, 2016

---

# Invalid feed, blank lines, function.php

 *  Resolved [M1chel](https://wordpress.org/support/users/m1chel/)
 * (@m1chel)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/invalid-feed-blank-lines-functionphp/)
 * Hi,
    I have a problem that seems to affect many users: I get an error message
   when I try to validate my feed for feedburner. It says that I have some blank
   lines before the XML declaration.
 * > This feed does not validate.
   >  *
   >  line 1, column 1: Blank line before XML declaration [help]
 * It suggests to check the wp-atom, wp-rss2, wp-config files or theme specifics
   like th functions.php
    I know it’s not fault of my plugins coz it didn’t validate
   also without plugins. When I first checked I had 13 blank lines, then I erased
   some from the function file and now I have only 2.
 * I’m not sure where else to check, however can you take a look at my functions.
   php to see if I’m missing something?
    Or do you have a solution to fix the lines?
 * [code moderated]

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/invalid-feed-blank-lines-functionphp/#post-1188439)
 * Please don’t post huge chunks of code here. For larger blocks of code, use the
   [WordPress pastebin](http://wordpress.pastebin.ca/). It makes life easier for
   everyone.
 * The url of your site would be more helpful…
 *  Thread Starter [M1chel](https://wordpress.org/support/users/m1chel/)
 * (@m1chel)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/invalid-feed-blank-lines-functionphp/#post-1188450)
 * Hi Esmi, sorry I didn’t know about pastebin.
    Here’s my code [http://wordpress.pastebin.ca/1541609](http://wordpress.pastebin.ca/1541609),
   now you can moderate my previous post if it’s possible.
 * the url of my site is [http://designerbreak.com](http://designerbreak.com)
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/invalid-feed-blank-lines-functionphp/#post-1188462)
 * You have some white space or invisible formatting characters at the very top 
   of your RSS feed. From what I can tell, these are coming from your theme’s header.
   php file as your web pages also demonstrate the same opening ‘blank’ lines.
 * Try editing header.php and removing everything before:
 * `<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.
   org/TR/xhtml1/DTD/xhtml1-transitional.dtd">`
 *  Thread Starter [M1chel](https://wordpress.org/support/users/m1chel/)
 * (@m1chel)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/invalid-feed-blank-lines-functionphp/#post-1188472)
 * uhm, I edited the header.php and also my custom home.php where the only thing
   before the doctype was
 *     ```
       <?php
       /**
       Template Name: header
        */
       ?>
       ```
   
 * now it’s gone but my problem is still there..
    Any other advice? can you spot
   something else?
 * thank you!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/invalid-feed-blank-lines-functionphp/#post-1188586)
 * The lines/invisible characters are still there – which means that this could 
   be coming from another WordPress file. You may have to start going through every
   file looking for blank lines either before the opening `<?php` tag or after the
   closing `?>` tag. 🙁
 *  Thread Starter [M1chel](https://wordpress.org/support/users/m1chel/)
 * (@m1chel)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/invalid-feed-blank-lines-functionphp/#post-1188622)
 * I looked for a while into the problem and I couldn’t find which file was affecting
   the feed.
    Finally I used this solution: [http://stiern.com/tutorials/no-more-invalid-rss](http://stiern.com/tutorials/no-more-invalid-rss)
   Yesterday I tried the same thing but with the .htaccess file and I damaged something
   important which got me to reinstall wordpress. I suggest you modify just the 
   index file like described on that site.
 * Thanks Esmi for your time.

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

The topic ‘Invalid feed, blank lines, function.php’ is closed to new replies.

## Tags

 * [invalid](https://wordpress.org/support/topic-tag/invalid/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [M1chel](https://wordpress.org/support/users/m1chel/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/invalid-feed-blank-lines-functionphp/#post-1188622)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
