What I’m looking for is a PHP code, not an HTML code. My sidebar mostly consists of this:
<div class="sidebar">
<?php /* Widgetized sidebar, if you have the plugin installed. */
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<?php wp_list_pages('title_li=Pages' ); ?>
<?php wp_list_categories('show_count=1&title_li=Categories'); ?>
<?php endif; ?>
</div>
I’m pretty sure that’s not the source of the problem. Nowhere does it cause each widget to be a list item, since the dynamic sidebar code replaces whatever I’ve put in between.
What I’m looking for is the PHP code that causes each widget to be a list item. For example, I was successful in doing so in /wp-includes/category-template.php when I changed it from this:
if ( $title_li && 'list' == $style )
$output = '<li class="categories">' . $r['title_li'] . '<ul>';
to this:
if ( $title_li && 'list' == $style )
$output = '<h3 class="menuheader expandable">' . $r['title_li'] . '</h3><ul class="accordion">';
But since I’ve activated widgets in my sidebar, this no longer applies. So where could I find the file that’s making each widget a list item?