Today’s Plugin Monday is focused on sidebar widgets. A plain vanilla WordPress install has a nice set of widgets for the sidebar, but they are fairly limited in how they present information to the user. Here are three plugins to help you with both the form and function of your sidebars:
PHP Code Widget – This plugin is exceptionally handy as it allows PHP code to be executed within sidebar widgets. Normally WordPress only allows HTML within the sidebars. This plugins open widgets up to the addition of PHP functionality, creating a new type of widget called simply “PHP Code” which can be used multiple times just like the “Text” widget. This added PHP functionality compliments other plugins that create new PHP functions which can then be called into the widgets. Both plugins below are great examples of this.
Update: Because of security concerns with plugins like PHP Code Widget, we recommend using the plugin with caution. Though many WordPress users are actively employing this plugin, that doesn’t necessarily mean that it’s safe or secure. This plugin allows PHP to be written directly to the MySQL database, meaning that any user that has access to this plugin would essentially have access to the whole site as they could insert code to give themselves such rights. So, only use this plugin on sites that are already well-secured and are being used by a small number of trusted users. When possible, use the standard method of widgetizing code rather than using PHP Code Widget.
If you have any information about other security risks associated with this plugin, please post a comment.
Multi Column Category List – Save space on your site while leaving all of your categories visible (not hidden in a drop-down menu) by using this handy plugin from Dagon Design. The plugin uses a bit of PHP magic to split your list of categories into columns. The number of columns can be changed in the plugin’s settings screen. The category list can be added to any page or post using trigger text (<!-- multicollinks -->), or called directly from a template file by using <?php echo ddmcl_generate(); ?>.
The plugin also has the option of splitting the list up into blocks based on letter. For example, links to Amazon.com and Ask.com would appear under the “A” heading. This could be useful if you have an especially lengthy blogroll.
The one tricky part of using this plugin is properly configuring the CSS file. Make sure to place the CSS file included in the root folder of your current theme. This applies to theme frameworks like Thesis as well—don’t place the CSS file within a “custom” folder or other framework mechanism.
Within the plugin’s CSS file, you’ll find these lines of code, defining the basic column style:
.ddmcc {
width: 200px;
float: left;
padding-right: 20px;
}
Be sure to set the width of this style small enough to allow for two columns of that size to fit into wherever you’re placing the trigger text or template call. If you set the width too wide, you’ll be left what appears to be the same, single-column list you’re used to. This is caused by the second column being bushed below the first, which will look no different than what you started with.
Multi Column Link List – This plugin gives you the same functionality as the plugin above, but with links rather than categories. The CSS file placement and customization for the category plugin also applies to this links plugin.
You can see the PHP Code Widget and Multi Column Category List in action in our sidebar here at ReadyMadeWeb.
WordPress’s extensibility, its very expandable model that allows for this sort of customization, is powered by its huge developer community. So, if you use these plugins, please consider donating to their developers. Your donation compensates them for a little bit of their time and can provide a lot of encouragement to keep them working for the betterment of the WordPress community.
As always, if you have any questions about about using these plugins or anything else we’ve blogged about at ReadyMadeWeb, please email us at info@readymadeweb.com.


