I've read all the articles about creating a custom RSS feed, but haven't had any luck - always results in a blank page. To make things simple, here is the code I'm using - with the link being www.mysite.com?feed=fb2

Note, this has worked on some servers (meaning there is no blank page, and the RSS works), but not on others with no apparent logic to explain why. Can anybody see what might be going on?

function rssmi_feed() {
add_action('init', 'rssmi_rss');

function rssmi_rss(){
  add_feed('fb2', 'rssmi_feed');
function get_my_feed(){
  header("Content-Type: application/rss+xml; charset=UTF-8");
  echo '<?xml version="1.0"?>';
  $output = '<rss version="2.0">';
  $output .= '<channel>';
  $output .= '<title>Your RSS Feed Name or Website Name</title>';
  $output .= '<description>A description of your feed or site.</description>';
  $output .= '<link>http://www.yoursite.com/</link>';
  $output .= '<copyright>Your copyright details</copyright>';
  $output .= '<item>';      
  $output .= '<title>Some Title</title>';   
  $output .= '<link>Some Link</link>';
  $output .= '<description>A description</description>';
  $output .= '<pubdate>The date</pubdate>';
  $output .= '<guid>The Link</guid>';
  $output .= '</item>';
  $output .= '</channel></rss>';
  • 1
    Please add debug information to your question to make answers possible.
    – fuxia
    May 4, 2013 at 21:17
  • Is there a working URL?
    – s_ha_dum
    May 4, 2013 at 21:28
  • it's actually on a development server...I changed it so debug=true, but I still get a blank page. I'll put the program on a production server and provide a link in a few minutes (although it will be blank).
    – Allen
    May 4, 2013 at 23:35
  • wprssimporter.com?feed=allenfeed
    – Allen
    May 4, 2013 at 23:37
  • also, the link above has a different slug (allenfeed instead of fb2) but the program is exactly the same (with just a different slug)
    – Allen
    May 4, 2013 at 23:51

1 Answer 1


Invalid Feed template message sometimes due to having a page or post with same name. Wordpress doesn't handle attributes with overlapping names (reused names) well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.