If you have an WordPress account in wordpress.com you have probably seen that you can manage your sidebar dynamically. For this to work the current theme has to support widgets. Autmattic has come up with a plugin to enable this feature in a regular wordpress installation.
In order to widgetize your current theme all you have to do is register some functions and add a small amount of code to your sidebar.php. If you don’t have a functions.php in your theme create one and put this to it.
This is to register the sidebar as dynamic. Save and close we are done with functions.php
Let’s move on to sidebar.php and take a look how a regular file would look like.
To enable the widget support all we have to do is enclose the sidebar code in an if statement. Like this:
If you uninstall thw widget plugin or decide not to use it the default sidebar will be shown, the code within the if statement. Now go and install the widget plugin and you are set to go.