When I write a quote in the text widget and displayed the text is wrapped as “My text…”. I would like to remove the div and put simply “My text…”. without using jquery.

For Example: Current output

<div class="container">
   <div class=“textwidget”>
       My text...
   </div>
</div>

Required output:

<div class="container">
    My text...
</div>

This is the actual code:

<div class="container">
    <?php dynamic_sidebar('text_show');?> 
</div>

2 Answers
2

More than likely this is an issue with the register_sidebar() call in functions.php.

Look for before_widget and after_widget. The code below is the default usage.

'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget'  => '</li>',

Note: This will alter all of the widgets within the sidebar, not just the TextWidget.

Leave a Reply

Your email address will not be published. Required fields are marked *