Chip's Quips
A tiny spark of wit for a highly flammable world

Tag cloud sidebar widget for WordPress, because my sidebar wasn’t long enough

May 28th, 2006 11:44:41 am pst by Sterling Camden

UPDATE (2009-6-20): For a highly configurable widget that uses the tagging system built into WordPress, use this one.

On the advice of Alec Saunders, I enabled tagging in my blog using the Jerome’s Keywords plugin for WordPress 2.0. Then I went through my posts and got all Chris Pirillo on the tags.

Jerome’s Keywords plugin has a lot of nice features and good documentation. It even provides a great function for generating a tag cloud, where you can render tags differently depending on their use count without much trouble. However, it doesn’t provide a sidebar widget for that, and you can’t just plunk PHP code into a text widget, because it isn’t executed on the server. So, I decided to write a widget that would provide a tag cloud from the keywords. You can download it from Chip’s Tips. You can see it in action in the sidebar on the right, if you are reading this at my site. I found that using a maximum font size of 6 worked best for my theme. Your mileage may vary.

This was my first attempt at writing a sidebar widget for WordPress, and I must say I found it quite easy. Kudos to Matt and team for keeping the interface simple yet powerful, and for providing some good examples. It was so easy, I might get all widget-happy and write some more, until my sidebar gets to be about eighty miles long.

UPDATE: Besides recently adding caching, I also fixed a bug in the font class attribute.� If you downloaded this widget before 6/16/06, you might want to get a fresh copy.

Posted in Blog Blog, Coding...OK?, Wildly popular | 55 Comments » RSS 2.0

55 Responses to “Tag cloud sidebar widget for WordPress, because my sidebar wasn’t long enough”

  1. [...] keywords-tagcloud – displays a tag cloud using keywords from the jeromes-keywords plugin [...]

Leave a Reply