Showing Google Reader Feeds on a Wordpress Sidebar
Google Reader has some great tagging and sharing features. You can easily get an Atom feed of those stories that you have tagged with a particular tag - this is a great way to keep a public ‘current reading’ list. It wasn’t as easy as I had thought it would be to get this feed up on my Wordpress blog, but I found a way. Hopefully the below will be helpful to anyone trying to do the same.
The Problem:
Wordpress uses the Magpie RSS parser to parse feeds. This is true for the built in RSS widget and also the advanced KBRSS widget. Magpie has some limitations that are highlighted by Google’s feeds. In particular Magpie has a nasty habit of taking multiple <link> tags and squishing them into one, and doing the same with multiple <title> tags. Very bad behavior for a parser. Without any additional treatment, Wordpress digests Google Reader links like the picture at right.
The Solution
I’ll cut out some of the wrong turns along the way. This post, from EconTech, solves a parallel problem and gave me the key to fixing this one. We need to scrub the feed before we send it over to Wordpress. He used Feedburner to clean it up and translate it to RSS, than let Wordpress and Magpie digests the RSS that Feedburner spits out.
The Step-by-Step
- Get your Google Reader Feed URL (Settings -> Folders and Tags -> View Public Page -> Get the feed from your browser)
- Set up a Feedburner feed using the URL from step 1
- On the Feedburner feed, deactivate Browser Friendly and Smart Feed (under the Optimize tab)
- Still on the Feedburner feed, activate Convert Format using RSS 2.0.
- Note the URL of the feedburner feed
- Use that one to populate your RSS widget in Wordpress
Bonus Points
- I assume that the default Wordpress RSS widget works, but I didn’t try it. Part of what I like about Google Reader is the ability to add notes to the items you share, and I wanted to make sure those got fed in. So I’m using the kbrss plugin. You can follow the instructions to set that guy up - it’s pretty straightforward. I use a template along these lines to get the fields I want:
<li><span class=’reading-date’>^pubdate[opts:date=F jS Y]$</span><br/>
<a class=’reading-link’ href=’^link$’ title=’^title$’>^title$</a><br/>
<span class=’reading-annot’>^gr=>annotation_content$</span></li>
- If you get deeper into kbrss, you’ll probably want to use the ?kbrss=feed_url option to take a look at how Wordpress reads your feed. On my setup, I had to encode my feed url before this option would work. Probably some sort of security issue. Here’s a string encoder.
Missing Pieces
What’s left out of this solution is those second and third links and titles that were in the original feed. In particularly, the title of the blog that the story originally came from doesn’t get carried through. If you want to take up the charge, that’s something that should be picked up in a more robust solution.

Thanks!It works!!
Outstanding work - thanks so much.
A very neat workaround.
Thanks! Helped a lot.
Thanks, I wanted to set this up on my new blog, and your instructions worked perfectly!
One note, I realized the links and title’s weren’t showing up correctly when I used the template to display my comments in the widget. I fixed it by changing all the apostrophes(’) to quotes(”) and it worked like a charm.
I just had a hiccup with this today. Without my making any changes to Reader, Feedburner, or my blog, the sidebar feed started to look funny. It was showing post titles and originating blogs (huh?) and not showing my comments. I started digging into the problem, but after checking feedburner to see if anything went wrong, the problem just went away. Hmm…
I love my Google Reader and have tried a few ways to include some of my public feeds in wordpress, but have found a lot of frustration. I wasn’t able to get feeburner to fix things either.
The only solution I have found that fully translates the Google RSS, complete with the links to original articles and all is to pass it through Yahoo Pipes, then Feed Wordpress plugin.
That also offers some interesting possibilities for combining new feeds, adding flickr feeds and even further filtering. Or just add the one feed and use the new Yahoo feed to bring into wordpress.
In wordpress I like the FeedWordpress plugin.
Wp-O-Matic killed my site, spiraling out of control! I had to call my hosting company and have them kill the process. In just a few minutes it posted hundreds of posts from a feed with 8 posts total!
Or if you just want titles, find the Simplepie Plugin - Works great.
Nice explanation.
For those still struggling or looking for a solution, we just released a plug in a few days ago that makes it really easy to add Google Reader shared items to your blog and customize what it looks like. It even includes widget support.
http://wordpress.org/extend/plugins/recommended-reading-google-reader-shared/
Would love your feedback on how to improve!
You post is very helpful to me and I