I have sidebar and when I add the components to it, the heading get added inside the li items of ul, making it look ugly. How do I overcome this. Unfortunately I have little or no knowledge of both wordpress and php.
here is how I get it in firebug:
<li class="widget widget_categories" id="categories-8"><h2 class="widgettitle">Categories</h2>
<ul>
<li class="cat-item cat-item-1"><a title="View all posts filed under Uncategorized" href="http://localhost/wordpress/wordpress/?cat=1">Uncategorized</a>
</li>
</ul>
</li>
This is what I have in sidebar apart from some static html ul li pieces:
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar() ) : else : ?>
<ul class="ul-cat">
<?php wp_list_categories('show_count=1&title_li='); ?>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<?php endif; ?>
If your theme supports dynamic sidebar then you can remove
wp_list_categoriesandwp_get_archivesfunction calls from your sidebar.php and can use dynamic widgets from WordPress admin > Appearance > widgets and addCategoriesandArchiveswidgets to your sidebar.This is only an example, basically resides inside
functions.php, generates dynamic widgetsIf you leave
before_titleandafter_titleblank as followsThen your
h2will be gone.Note: In your question you mentioned
h3but in your generated HTML code I sawh2.