solostream

FeedBurner modification to header.php

| March 15, 2007 | 2 Comments

After writing the following, Eric Olson from FeedBurner responded saying that the FeedBurner Plugin covers autodiscovery too, so there is no need to hack your header.php file to make sure that news readers are automatically redirected to your FeedBurner feed. You can see his comment below.

I have diligently installed orderedlist’s FeedBurner Plugin in all blogs I have created so that we can all monitor our feed subscribers with FeedBurner. For some reason today, while I was looking at my FeedBurner stats, something didn’t seem quite right. I realized that I had never tested out autodiscovery on my feed.

So I did a test. I opened up Netvibes and entered the URL of my blogs to see what the autodiscovery picks up. Guess what – the WordPress default feeds were detected, not FeedBurner! Now I actually don’t know if this makes a difference, but one of FeedBurner’s forums has directions for making sure that the autodiscovery picks up the FeedBurner feed, which involves hacking your header.php file.

Do you have to make these changes to ensure that all feeds are redirected through FeedBurner? I don’t know. But I made the changes, and now when I did an autodiscovery test, it only picked up the FeedBurner feed.

So here are the changes you need to make:

  1. Look in your header.php file for code that looks like this:
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    You may find two or three code bits that are listed one after the other that resemble the above. Each one is dedicated to a different type of feed, like RSS 2.0, RSS .92, and Atom.
  2. Your code may have something else in between the quotation marks after href. Whatever appears in those quotation marks, which in this case is <?php bloginfo('rss2_url'); ?>, replace with the link to your FeedBurner feed. So for example, for this site, we would enter http://feeds.feedburner.com/WordpressGarage.
  3. Save and upload the file.

Now autodiscovery will only find your FeedBurner feed link.

Tags: ,

Category: Tips

Elegant WP Themes

Comments (2)

Trackback URL | Comments RSS Feed

  1. Eric Olson says:

    Hi Miriam,

    The answer to your question is no, you don’t have to modify the autodiscovery if you are using the plugin. The plugin will route all requests for any of the WordPress created feeds to your FeedBurner feed. Hope that helps!

    Cheers,
    Eric Olson
    Publisher Services – FeedBurner
    312.756.0022 x2034
    erico@feedburner.com

  2. Ryan says:

    Does anyone know how to re-route feeds without using a plugin like this?

    I have a site which I assumed people wouldn’t use the feed of, but according to the stats, the feeds are getting quite a few hits. So I was thinking of using Feedburner instead so that I can track exactly how many people are using the feed. I normally just remove the feed link for my WordPress feeds and add a link to my Feedburner feeds, but then the people who are already using my feed will be still using the default WordPress ones, not Feedburner. I could setup an .htaccess redirect, but Feedburner is using those feeds to generate the feed for my site.

    I’m loathe to add another plugin, plus this seems like something which should be simple to do the old fashioned way – but I can’t for the life of me figure out how.

    Hopefully this makes sense, if not I’ll try to reword it.

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.