Remove before_widget / after_widget content from Wp_Widget_Text

You have a couple options as I see it:

There’s a the_widget() template tag that lets you control the before_widget and after_widget properties. However, it divorces the widget from the Widgets UI.

Alternately, you can try to accomplish whatever you’re trying to do via CSS. If you change your before_widget line to this:

'before_widget' => '<p id="%1$s" class="widget %2$s">',

you’ll get some classes and IDs that will make each widget style-able.

Leave a Comment