Skip to content


Creating a tag cloud in WordPress

I fiddled around with my toy link blog, Fanmode, again in a bid to further improve it. This time I added functionality in the form of a tag cloud.
WordPress tag cloud
Tags were introduced in WordPress 2.3 but I didn’t bother with them much because I figured tags were unnecessary when posts were already categorised under categories.

I changed my mind after reading various articles about the differences between tags and categories. I think Lorelle VanFossen put it best when she likened categories and tags to the table of contents and the index pages of a book respectively.

WordPress 2.3 may have introduced support for tags but there’s no means of exploiting those tags for navigation. There are a few plugins that try to provide this function. I was keen on using the Configurable Tag Cloud widget, in particular, but thought I had better wait until it was approved by WordPress.org and placed in the official plugin repository.

Then I found out today creating a tag cloud in WordPress 2.3 is actually simplicity itself. WordPress actually has a built-in fuction for a tag cloud, wp_tag_cloud, and the WordPress Codex lists its parameters and provides examples for using it.

I found, however, the example the Codex provided didn’t work quite right for Fanmode. The tag cloud was showing up just fine but the site wasn’t validating. The culprit was the ul tag which was apparently superfluous. I removed the offending tag and the site validates just fine now.

Posted in Software, WordPress.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.