Simple Widget Classes WordPress Plugin

Have you every had a time when you have added two of the same widget to a sidebar and wanted to style them differently? You may have run into problems as they have the same CSS classes etc. and the ID they are given is random. This is why I created the Simple Widget Classes WordPress plugin.

The plugin simply adds an additional text input box to each widget added to a sidebar in the admin. In here you can type the names of any classes (space separated) that you would like to give to the widget. This can then be used for custom styling.

Download this really simple plugin from wordpress.org.

WP CSS Widget Classes

I have been working on a number of client sites recently and there seems to be an every increasing need to use WordPress widgets, and why not as they are a great way of getting content where you need it. However styling them provided tricky as they all have similar classes (although this is flexible to a degree through register_sidebar(). Therefore I have developed the WP CSS Widget Classes plugin.

wp-css-widget-classes

The plugin provides a select box on each widget that you add to a sidebar. This allows you to choose from the built in classes which are colour based. However you can always customise the classes in the select list by add a simple bit of code to your WordPress theme functions.php file. Maybe in a future release I will add a UI for this but for now code is needed.

The code is open sourced and available to browse, download, fork or submit a pull request from on Github. The repository is linked below:

WP CSS Widget Classes on Github