RSS
 

Archive for the ‘WordPress’ Category

WordPress and FeedBurner feed

21 Aug

By default, WordPress generates the following feed link:

<link type="application/rss+xml" href="http://evgeny-goldin.com/blog/feed/"/>

After registering this feed at FeedBurner I wanted "http://feeds.feedburner.com/GoldinTheJunior" to replace the link above. Since my current theme, ChocoTheme, doesn’t provide an option to configure the feed link, I had to make some changes in the code.


1. Changing RSS icon link.

"wp-content/themes/chocotheme/header.php":


2. Changing <link type="application/rss+xml" href="..."/> link.

"wp-includes/general-template.php":

This will take you to the FeedBurner if you use Google reader RSS Subscriber or any other browser tool to subscribe to the site’s RSS feed.

3. Feed redirect.

Redirect of "evgeny-goldin.com/blog/feed" to "feeds.feedburner.com/GoldinTheJunior" is possible:

After activating feed redirect with RewriteRule in .htaccess file FeedBurner stopped pulling feed updates. It discovered a loop and stopped requesting the original URL. Indeed, if all feeds are redirected to a FeedBurner how does it get an original feed?

It is taken care by user agent conditions:

RewriteCond %{HTTP_USER_AGENT} !FeedBurner    [NC]
RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]

But I’ve settled with code modifications for now. It means I’ll need to take more care of WordPress upgrades as they will probably overwrite the “patches” shown above but I don’t mind re-applying them again after each upgrade. The fact that WordPress is developed in PHP makes it ridiculously easy to tweak its code where needed.

I want to specially thank Ms. Ileane Speaks and her new blog “Basic Blog Tips” for working on this issue together in “Basics of Blog Feeds and FeedBurner”. Thank you, Ileane!