Lifestyle and Emerging Technology In Plain English

Tweaking your FeedBurner / FeedSmith plugin to support WordPress 2.5+ tag feeds (easy!)

FeedBurner Logo (© FeedBurner, Inc.)
Creative Commons License photo credit: mag­bag

Sorry for the über tech in this post, but I thought this was a simple fix that any­one run­ning a Word­Press 2.5+ blog could do if they wanted to enable ‘Tag Feeds’.

Before I get into the how, let’s explore the why briefly.

Some back­ground:

  • Feed­burner is the ser­vice I (and many many other) blog­gers use to improve RSS Feed per­form­ance and meas­ure read­er­ship of our RSS feeds.
  • The Feed­Smith / Feed­Burner plu­gin is a com­pon­ent for Word­Press (the blog­ging plat­form I use here) that sim­pli­fies the admin­is­tra­tion and imple­ment­a­tion of Feedburner.

The cur­rent incarn­a­tion of the Feed­Smith / Feed­Burner plu­gin doesn’t sup­port the new Word­Press fea­ture of RSS Tag Feeds. No big deal if you don’t care about allow­ing your vis­it­ors to sub­scribe to your con­tent based on Tag. But you’re miss­ing an oppor­tun­ity to allow your read­ers to bet­ter fil­ter the con­tent if that’s the case.

For example, lets say a vis­itor is only inter­ested in receiv­ing my posts on pho­to­graphy. They don’t care about all this tech­no­logy, web con­tent, usab­il­ity, or search engine optim­iz­a­tion that I may be writ­ing about. They only care about my pho­to­graphy posts. Word­Press 2.5+ allows you to sub­scribe to any Tag Feed or Cat­egory Feed. But not if you’re using an unmod­i­fied Feed­Smith plu­gin. Fear not, I’ve got a fix for you in a moment.

The way the cur­rent Feed­Smith plu­gin works is that it takes all my feed sub­scrip­tion requests (com­ment, cat­egory, tag, etc) and returns only the main blog RSS feed, which is the main feed at Feed­burner. Not good if you want to have an RSS Feed of only my pho­to­graphy tagged posts.

The work­around is quite simple and requires slightly modi­fy­ing your Feed­Burner / Feed­Smith plu­gin. Here’s how:

  1. Nav­ig­ate to the main Plu­gins page. Scroll down until you find the Feed­burner / Feed­Smith plu­gin. Click on the Dis­able link in the right-hand column. When the page refreshes, scroll back down and click on the Edit link.
  2. The Plu­gin Editor screen will open. Scroll down in the edit win­dow until you find the func­tion function ol_feed_redirect()
  3. In that sec­tion you’ll be adding text to a line of code. Change the text that reads
    is_feed() && $feed != 'comments-rss2' && !is_single() &&
    to read
    is_feed() && $feed != 'comments-rss2' && !is_single() && !is_tag() &&
  4. Scroll to the bot­tom of the page and press the Update File button.
  5. Then, go back to the main Plu­gins page, and re-enable the Feed­Burner / Feed­Smith plu­gin by click­ing on the Enable link.

Con­grat­u­la­tions, you’ve just re-enabled Tag RSS Feeds for your Word­Press 2.5+ blog whilst main­tain­ing Feed­burner com­pat­ib­il­ity for the main feed.

Bonus for the advanced stu­dent: Since your Tag RSS Feeds are now sep­ar­ated from the main blog feed, you can set up dis­creet Feed­burner feeds for select tags. Unfor­tu­nately the little hack above won’t auto­ma­gic­ally redir­ect RSS Sub­scrip­tions to Feed­burner for you, as the Feed­Smith Plu­gin does. You’ll have to manu­ally pub­lish the Feed URL, thusly:
<a href="http://feeds.feedburner.com/BlogbradgriercomWordpress">My WordPress tag feed hosted on Feedburner</a>

Which would render thusly:

My Word­Press tag feed hos­ted on Feed­burner.

Related Posts with Thumbnails

20 Responses to Tweaking your FeedBurner / FeedSmith plugin to support WordPress 2.5+ tag feeds (easy!)

  1. Hi Brad,

    Stumbled across your site on a ques­tion to hack the Feed­Smith plu­gin to work with cat­egory feeds. Your explan­a­tion of alter­ing it to work with tag feeds is so beau­ti­fully clear and con­cise, I won­der if you wouldn’t mind doing the same for cats!

    Thanks …

    Richard Miller (Sparkletack)s last blog post..SFWeekly: “Nonconformity Still Reigns”

  2. Brad Grier says:

    Ha!

    Hi Richard, thanks, your com­ment made me blow cof­fee out my nose *clean­ing the com­puter screen*…

    Cats, no, I have no wish to doc­u­ment cat alter­ing at this time. Though there are some cell­phone wield­ing drivers I’d like to alter :)

  3. Adieska says:

    Wow… Thanks for this tutorial. This is help us so much. I also won­der­ing if you can make a feed also for the cat­egory. Same ques­tion as Richard Miller :)

    Adieskas last blog post..Kenny Ches­ney: CMA 2008 Enter­tainer of the Year

  4. bgrier says:

    @Adieska — Good ques­tion. (Sorry @Richard, I mis­read your com­ment to mean you’d like me to alter felines, not categories) :)

    Though I’ve not tried it, I ima­gine that if you take the fol­low­ing text:
    is_feed() && $feed != 'comments-rss2' && !is_single() &&
    to read
    is_feed() && $feed != 'comments-rss2' && !is_single() && !is_tag() &&

    and change the last line to read:
    is_feed() && $feed != 'comments-rss2' && !is_single() && !is_tag() && !is_category() &&

    it ‘may’ work.

    Then you’d have to go through the same hoops of set­ting up the cus­tom feed­burner feed for any cat­egor­ies you’d like to feed.

    Again, not tested, so your mileage may vary.

    – Brad

  5. Anthony says:

    Thanks for your help, this was exactly what I was look­ing for!

  6. Brad Grier says:

    @Anthony — My pleas­ure Anthony. Always happy to help :)

  7. Great post. This was exactly what I needed.

    I exten­ded the code to include author feeds like this:

    is_feed() && $feed != ‘comments-rss2’ && !is_single() && !is_tag() && !is_author() &&

  8. Brad Grier says:

    @Chad, good call, thanks for post­ing that extension!

  9. Friend­Feed Com­ment


    Tw… [link to post]

    — Pos­ted using Chat Catcher

  10. […] Feed­Smith Feed­burner Plug-in and then you can set up a feed for just the tags you want. Thanks to Bradgrier.com where I found this use­ful post which gave me the instruc­tions I needed which I’ll repeat […]

  11. Missingtoof says:

    Thanks for the tip. I went a step farther strip­ping out all the Feed URIs that Word­Press inserts into the head of the doc­u­ment (for the RSS but­ton in/by the address bar). These fil­ters grab onto things in link-template.php (in word­press 2.9.*) and your theme’s functions.php file.

    func­tion remove_rss() {
    return;
    }
    add_filter(‘post_comments_feed_link’,‘remove_rss’);
    add_filter(‘category_feed_link’,‘remove_rss’);
    add_filter(‘author_feed_link’,‘remove_rss’);
    add_filter(‘search_feed_link’,‘remove_rss’);

    Then we can go in to header.php and add just the URIs of the newly cre­ated Feed­burner feeds to the manu­ally. Such as this:

    Hope that helps some­body (you’ve got the top res­ult on my Google search query, so it’s likely other people are com­ing here too)

  12. Missingtoof says:

    The XHTML was parsed out above. This would go in the <head>

    <link rel=“alternate” type=“application/atom+xml” title=“Missingtoof.com » Full RSS Feed (All Posts)” href=“http://feeds.missingtoof.com/missingtoof” />

  13. Missingtoof says:

    …damn, with your own title and URI, of course.

  14. Brad Grier says:

    Heh, nice work Miss­ing­toof! And thanks for tak­ing the time to share it, I’m sure someone will appre­ci­ate it, as you said, this thread is being searched and found.

    Cheers!

    –Brad

  15. […] cat­egory feeds con­tinue to work as they should is to modify the Feed­Burn­er­Feed­Smith plu­gin as noted here. Simply change the […]

  16. […] that plu­gin remove the abil­ity for folks to sub­scribe to RSS tag feeds dir­ectly from your blog. In this art­icle, the author explain how to re-enable this […]

  17. […] Next, modify the Feed­burner plu­gin as described by Brad Grier here. […]

  18. Grant Rettke says:

    After upgrad­ing to WP 3, this hack quit working.

    Did you find a work­around yourself?

  19. Brad Grier says:

    Actu­ally no, I’ve not fol­lowed up on this post at all…though I did just test it and tag feeds seem to work, per­haps WP fixed it? http://blog.bradgrier.com/tag/desktop/feed/

  20. […] Feed­Smith Feed­burner Plug-in and then you can set up a feed for just the tags you want. Thanks to Bradgrier.com where I found this use­ful post which gave me the instruc­tions I needed which I’ll repeat […]