When creating a widget, WordPress puts a <div class="typewidget">
around the widget.
I want to remove these extra divs without editing the wp-includes/default-widgets.php
file.
In my theme index.php
file, I use:
<ul>
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar('widgetname') ) : ?>
<?php endif; ?>
</ul>
Then, in the functions.php
file:
register_sidebar(array(
'name' => 'widgetname',
'before_widget' => '<li>',
'after_widget' => '</li>',
));
And this shows in the site:
<ul>
<li>
<div class="textwidget">
<strong><a href="#">musica</a></strong> <a href="#">Lorem ipsum dolor sit amet dolor sit am.</a>
</div>
</li>
</ul>
Any ideas? Thanks.