WordPress Widgets and Flickr RESTful APIs

I have done some significant WordPress modifications for friends in the past, be it basic theme manipulations or custom hacking of plugins, but I decided that I wanted to write my own widget to help tie my Flickr account into my blog. I did some searching on the currently hosted WordPress plugin site, and while there were several that tapped the Flickr API, they all seemed too clunky or not quite flexible enough for what I had in mind. Simply listing the most recent thumbnails from my photostream couldn’t be that hard, right? As it turns out, no, it wasn’t.

If you look in the sidebar of my blog, you’ll see a section titled “Recent Photos” that is pulling a live search feed from my Flickr account. Tying this into a WordPress widget that displays the images in a predefined format came quite quickly and easily, and in the course of a couple hours, I found myself looking at my completed widget thinking that surely there must be more to it. All in all, the project went off pretty seamlessly. The new widget format since WP2.8 is amazing, and it becomes simple and incredibly quick to put together some rather robust ties to other APIs.

For those who care to test the widget for yourselves, please feel free to download it here.

To set it up the widget, just follow these steps:

  1. Copy the guahanFlickr.php file into your /wp-content/plugins directory in your WordPress install
  2. Activate the plugin from the “Plugins” menu on your admin panel.
  3. Set the Flickr username and display options from the “Widgets” menu on your admin panel.

That’s it! I’m open to comments and suggestions. Please let me know if you have any difficulty getting it set up.


  1. Can I like post a code rather than activating it at the widget bar? My theme doesn’t support widgets. 🙁

  2. I haven’t done a standalone widget yet, but I might do a JavaScript-only version that would support you just pasting code (similar to a Google Analytics idea).

Leave a Reply

Your email address will not be published. Required fields are marked *