views:

30

answers:

1

I am using widgets in my wordpress theme and I need to remove the:

<div class="textwidget"></div>

that appears around the widget's content. I am using this in my function.php file:

    if (function_exists('register_sidebar'))
 register_sidebar(array('name'=>'Church Address',
 'before_widget' => '',
 'after_widget' => '',
 'before_title' => '<p class="bold">',
 'after_title' => '</p>',
));

but I need to remove the div from around the text widget's body. Is there some way to do this?

I also have another question. When I put let's say, a

tag in the before_widget and a

in the after_widget shouldn't it put a paragraph tag around the entire widget? Instead, it put them both before the entire widget. HELP!

A: 

On your page.php the code should be something like:

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Church Address') ) : ?>
<address>
     <p class="bold">
       The Church Address goes here if the sidebar isn't working or not loading
     </p>
</address>
<?php endif; ?>

then enable your sidebar widget: admin->appearance->widgets the code which is inside your functions.php file should be fine. although if using the p tag, I would encompass this in an address tag for better read ability, also its supported by all the major browsers..

if (function_exists('register_sidebar'))
 register_sidebar(array('name'=>'Church Address',
 'before_widget' => '',
 'after_widget' => '',
 'before_title' => '<address class="bold">',
 'after_title' => '</address>',
));
Marty
I know this. But whenever I use the before_widget and after_widget both tags appear before the widget instead of before and after.
codedude
can you post an example of the output'd HTML you receive and also the code on the page.php file.. possibly the functions.php file aswell..
Marty
it doesn't matter anymore. Thanks anyways.
codedude