If you are planning on making a WordPress theme available to the WordPress community, it has become somewhat of a necessity for it to support widgets. This is especially true now that recent WordPress installs now come with this ability built-in, meaning you no longer need a plugin to accomplish this. This will make your theme more appealing to a larger number of WordPress users because they will not need any coding knowledge to set up their sidebar to look how they want it to.
If you would like to set up your theme to support widgets, I recommend you check out this post by Garry Conn entitled How To Widgetize a WordPress Theme. In his post, he provides a detailed walk through of how to widgetize your sidebar for a 2-column theme.
According to Automattic, it is also really easy to add widget support to 3-column and 4-column themes:
Instead of register_sidebar() you should use register_sidebars(n) where n is the number of sidebars. Then place the appropriate number in the dynamic_sidebar() function, starting with 1. (There are several other ways to use these function. See the API). You can even give your sidebars names rather than numbers, which lets you maintain a different set of saved sidebars for each theme.
My favorite part about widgets is that it provides a extra option for theme users, but isn’t required to be used. A theme that supports widgets can still be adjusted manually if you prefer to do things the hard fun way.









Wednesday, October 10th, 2007 at 2:40 am
Hey there,
Thanks for mentioning my article!
Take care,
Garry
Wednesday, October 10th, 2007 at 8:54 am
Thanks for stopping by Garry. Keep up the good work on your site!