I want wrap all default widget into a div tag, so i can add a suffix class to define style for each widgets
<div class="suffix-class">
// widget
</div>
And in widget form, we have a input field to input this class.
It like module of joomla.
What can we do ? override all default widget ?
In the
register_sidebar()
call infunctions.php
.Look for
before_widget
andafter_widget
and modify as appropriate. The code below is the default usage.I see this uestion is kind of old, but it also doesn’t seem to have been answered. For anyone who wants to do this, I don’t know how to do it via the template/code but there is a WordPress plugin that lets you do it http://wordpress.org/plugins/widget-css-classes/ . It works just like joomla so your widget will be like.
(Depending on your template) Hope this helps someone!