Development on a Shoestring

Feed Locations WordPress Plugin

With the onset of FeedBurner and similar services, a lot of bloggers will find themselves not using the default location for the RSS/Atom feeds. But if you want to provide the links to these new feeds, you’ll have to edit the template files any time you change templates, and make sure you remember to edit all the templates you use (if you’re implementing template switching) and remember to update the <link> tags in the HTML head as well.

This just seems too messy, especially when the location of the feeds isn’t hard-coded into the templates, but is generated with a function. So this plugin allows you to set the URLs of the RSS and Atom feeds for your posts. It’s a very simple plugin that just adds a page to the ‘Manage’ admin menu called ‘Feed Locations’ and it provides you with five text boxes: RSS .92, RDF (a.k.a. RSS 1.0), RSS 2.0, Atom & the Comments RSS 2.0 feed. You can change any or all of the locations, if you leave one blank it will stay as the default WordPress location for that feed.

So what this means is that if you set your RSS 2.0 feed location to, say, a FeedBurner url, anywhere that your templates show a link to /feed/ (the default location of thye RSS 2.0 feed) it will be replaced with the FeedBurner address. No editing of the templates required. And it will remain no matter what template you use.

Installation & Setup

Download the plugin (see download link under ‘Plugin Information’ on the sidebar) and put the file in your /wp-content/plugins/ directory. Activiate the plugin and then click on the ‘Manage’ menu and then ‘Feed Locations’. You should see a page that looks like this:

Manage Feed Locations Page

From there, just enter the respective urls and then click ‘Update’. That’s it. Told you it was a simple plugin.

Technical

The function that the templates use to get the feed locations is bloginfo('rss2_url') or bloginfo('atom_url') etc. So anywhere that you want to use the feed locations you’ve set, use those functions. The available parameters are:

  • rss_url (RSS .92)
  • rdf_url (RDF, RSS 1.0)
  • rss2_url (RSS 2.0)
  • atom_url (Atom 0.3)
  • comments_rss2 (Comments RSS2.0 feed)

31 Responses for "Feed Locations WordPress Plugin"

  1. Development on a Shoestring » Wordpress Feed Location Changer Development on a Shoestring » Wordpress Feed Location Changer January 24th, 2006 at 4:46 pm 1

    [...] So I’ve written a small plugin that will allow the admin to set the urls for the different feed locations when bloginfo(’rss_url’); is called. You can get it from here. You can use it to change the locatons of these feeds: [...]

  2. jamie jamie April 5th, 2006 at 3:30 am 2

    I have recently moved to wordpress and I am trying to figure out how to get people subscribed to my old feed ( http://www.james-baker.com/news/atom.xml ) to be redirected to the new one ( http://www.james-baker.com/news/feed/ ) with aminimum of fuss.

    I have tried to follow the directions but perhaps I am too green to even get the basics? I still have the old atom.xml file in my directory (which used to get written by blogger) but oviously it isnt being updated any more. So rather than redirect TO it I want to redirect FROM it… am I using the wrong plugin?

    Thanks for your time. Any advice or link to a place I could get it is very much appreciated
    jamie

  3. blog400 blog400 June 20th, 2006 at 3:51 am 3

    Thanks so much, the Feed Locations WordPress Plugin works perfectly and saves a lot of hassle //

  4. lil wyte lil wyte July 21st, 2006 at 11:06 pm 4

    Hello!

    I installed Wordpress on my server, and set up a site. It’s a relly nice piece of software. However, I am missing a piece of functionality, and

    couldn’t find a suitable answer for it. Mayou you know a plugin I could use?I need to automatically inserts ads in my posts.And not AdSense ads, but rather HTML snippets defined by me (affiliate links, etc). Let’s say I would insert a tag in my post:
    – ad here –
    and the plugin would automatically replace it with some HTML code, when the post is displayed on my site.I really don’t need any fancy configuration options etc, just the basic replace functionality.
    Do you know a plugin that can handle this?

  5. Mark Mark September 5th, 2006 at 7:19 pm 5

    Hi,
    I like the plugin, looks good and works well.

    I have one question though, my blog is on a variety of subjects and I would like to be able to tell the bloginfo function the feed location, depending upon which category I am currently viewing, instead of having to enter it into the plugins management screen, kind of like this:
    bloginfo(’http://www.somesite.com/feedlocation/’) .

    Is this something you might consider for a future update?

    Thanks.
    Mark.

  6. vvLpLkpg vvLpLkpg October 5th, 2006 at 8:01 am 6

    Hello nice page? really i like it! thx will be bookmark

  7. David David November 30th, 2006 at 8:50 am 7

    Hi, excellent little plug-in. Simple and effective. Thanks a lot.
    David

  8. ShellyGreatful ShellyGreatful December 30th, 2006 at 9:57 am 8

    first hit off google.. I DO FEEL LUCKY!!! Yeeehaw!!

    Thanks for the work mate!

  9. Jason Jason January 15th, 2007 at 12:13 am 9

    Thank you! Finally a simple way to change my feed!!!

  10. Kisakookoo Kisakookoo January 24th, 2007 at 6:05 am 10

    Hi! Why I can’t fill my info in profile? Can somebody help me?
    My login is Kisakookoo!

  11. Carla Carla February 13th, 2007 at 8:23 am 11

    Is there a way I can put this on a wp page rather than in my wp template?

  12. Glenn Slaven Glenn Slaven February 13th, 2007 at 8:31 am 12

    If you install the exec-php plugin : http://bluesome.net/post/2005/08/18/50/ you could then call bloginfo(’rss2_url’) inside a page.

  13. bubazoo bubazoo February 25th, 2007 at 11:38 am 13

    awww, no listen link for the NIV version? :(

  14. Glenn Slaven Glenn Slaven February 26th, 2007 at 9:30 am 14

    Unfortunately the Bible Gateway site doesn’t provide a listen link in the feed. There is a audio link on the homepage for the current verse: http://www.biblegateway.com/

  15. Stephane Stephane March 2nd, 2007 at 9:51 am 15

    I don’t know what’s the problem but I had to replace few lines likes this one:

    with this one:

    Now it works.

    thanks!

  16. Stephane Stephane March 2nd, 2007 at 9:52 am 16

    I don’t know what’s the problem but I had to replace few lines likes this one:

    <?= $ft['name']?>

    with this one:

    <?php echo $ft['name']?>

    Now it works.

    thanks!

  17. The Heartless Liberal The Heartless Liberal June 8th, 2007 at 10:17 am 17

    This Plugin saved my life. Well maybe it wasn’t that serious but I was at my wits end with this. For some reason my Comment RSS Feed was causing my Data Base no end of problems. I had a Feed that would work, but I couldn’t get any of my links to link to it. I found your plugin and added the working URL in the Comment RSS data URL and Viola! My problem solved. I think this is a pretty common problem on Wordpress 2.2. I’ve seen a number of forums dedicated to it and the consensus seems to be that it’s caused by a plugin adding spaces in the template. It was a bit over my head, but thanks to you it just works.

    Thanks

  18. Kristopher Kristopher June 15th, 2007 at 9:12 am 18

    This plugin saved my life.

  19. Glenn Slaven Glenn Slaven June 15th, 2007 at 11:18 pm 19

    Kristopher, glad to hear it worked, and that this plugin is still useful! (Oh & sorry about your first comment, Spam Karma marked it for moderation for some reason…

  20. James D Kirk James D Kirk June 21st, 2007 at 9:30 am 20

    Glenn,

    How challenging would it be to modify your plugin to allow the site owner to create multiple feed redirects? For instance, we’re only really interested in RSS 2 on our WP site. At the same time, we are doing some interesting things like running a domain and a subdomain off the same WP install using the same custom theme. We’ve coded things such that depending upon the domain the visitor is on (boldlygoing.com or AreYou.BoldlyGoing.com) the theme will call different navigation, different categories, different widgetized sidebars.

    Since both “sites” still use the same database (users, post data, etc) I need to be able to burn different feeds with feedburner. The challenge with this is then having to go into the theme and ensure those correct feedburner URL’s are going to get displayed with the page the visitor is on.

    So, short story long, can your plugin be modified to allow me to explicitly enter a feedburner URL that might be for a specific domain/feed or subdomain.domain/feed, or even a feedburner URL that I create for domain/category/feeed.

    Hopefully, this is clear. If not, please drop me a line, and thanks for your time. We do appreciate it!

  21. ck ck July 4th, 2007 at 12:52 am 21

    I am trying to use your plugin to redirect the default feed to one that leaves out a category per this post: http://wordpress.org/support/topic/124459?replies=8#post-584338 For some reason it isn’t working. Am I missing something?

  22. Lauri Lauri August 1st, 2007 at 8:02 am 22

    Thanks for a great plugin, it solved my problems right away :) No need for tricky rewriterules etc. anymore.

  23. Lauri Lauri August 1st, 2007 at 8:07 am 23

    Except that for some reason the new URL of the comments feed now gives 404. I changed it from something.com/comments/feed/ to something.com/blog/comments/feed/. Anything I can do to fix it?

  24. Jason’s Jazz Music Jason's Jazz Music August 11th, 2007 at 12:29 pm 24

    @lil wyte I am wanting to do the exact same thing, did you ever get an answer to this? You asked: (I need to automatically insert ads in my posts. And not AdSense ads, but rather HTML snippets defined by me (affiliate links, etc).

    Can anyone help me with this?

  25. Manele Manele October 11th, 2007 at 6:23 pm 25

    I tested your plugin and is really nice. This Help me a lot with my blog! Thank You!

  26. Stephen Cronin Stephen Cronin November 8th, 2007 at 12:48 pm 26

    Interesting. Does this leave the default URLs in place and redirect them when they are called (such as the FeedSmith plugin does)? Or does it actually replace the default URLs in the HTML?

    I much prefer the first approach, because then readers are subscribing to YOUR feed URLs, not the FeedBurner ones. With the second approach, you’re tied into FeedBurner. If you ever want to leave their service, then you’ll have to get your subscribers to unsubscribe from the FeedBurner URL and then subscribe to the new URLs.

    While FeedBurner is unchallenged at present, so was Hotmail before GMail came along - okay there were others such as Yahoo Mail, etc, but the point is you may not always want to use FeedBurner. It’s better to keep people subscribed to YOUR feed URLs not the FeedBurner ones if possible.

  27. Glenn Slaven Glenn Slaven November 8th, 2007 at 12:59 pm 27

    Stephen, it is the second approach. If you’re after the first, I suggest you check out the official feedburner plugin ( http://blogs.feedburner.com/feedburner/archives/2007/05/feedburner_adopts_twoyearold_r.php ). To be honest, it has really rendered this plugin redundant :)

  28. Ty Tran Ty Tran November 8th, 2007 at 5:09 pm 28

    Im using your plugin on all of my blogs.

    it saves so much of my time.

    wp should an option to do this.

  29. Manele Manele November 12th, 2007 at 11:54 pm 29

    thank you for this plugin! i like this plugin because is not overloading the server so much!

  30. gantico gantico January 7th, 2008 at 7:25 pm 30

    Hi Glenn,
    I appreciated your useful plugin: I donated 1$ and I added it to my top ten list of WordPress plug-ins:
    http://www.gantico.com/blog/2007/12/wordpress-plugins/

    (I appreciated also your honesty in talking about the official plugin)

    Happy New 2008!

  31. Baithak Baithak February 15th, 2008 at 8:48 pm 31

    dear author,

    i have a question that is i run blog aggregator and i use smart rss. which only gets the feeds rss 2.0 or below. but it doesn’t get the feeds on atom your plugin gives the right to aggregate the atom (any version) but my question is does it insert it into the database as a post. if yes then its perfect or not then can you suggest me how it can insert it in to data base as a post. can you help me with it. please.

    i only get 120 words of post and redirect to the complete post to the original post.

    for more info u can visit my site at http://baithak.net

    i hope u will reply to my query.

    with regards,

Subscribe by email

Enter your email address:

Delivered by FeedBurner

Great hosting with Jumba

Verse of the Day

For if you love those who love you, what reward do you have? Do not even the tax collectors do the same? And if you greet only your brothers, what more are you doing than others? Do not even the Gentiles do the same? You therefore must be perfect, as your heavenly Father is perfect. (Matthew 5:46-48, ESV) (Listen)

Networks & References

  • Awesomesause Approved
  • Contributor to: Newstex Blogs on Demand
  • TechTalkBlogs