Widgets
Writing a widget bears some similarities to writing a plugin, but in some ways it's easier because there is a widget class that you can leverage for some of the functionality. In other ways, it's a bit more time-consuming as there's a lot of mandatory code that every widget has to feature.
Custom tag cloud widget
In this section, we'll see how to write a widget that displays a custom tag cloud that we can then place in the sidebar. There will also be the possibility to change the title of the widget, and although this is a tag cloud widget, we'll be able to switch tags to categories and display them using a tag-cloud-style as well.
This isn't a complete from-the-scratch design, though. I'm actually using one of ThemeFuse's (http://themefuse.com/) widgets that came with the Conexus theme we were using in Chapter 7, Developing Your Own Theme, when learning how to build themes (also available in the code bundle for Chapter 7
). The changes I'm making will give the widget a slightly different...