WordPress spits out lots of bloated markup for the Categories list. Specifically, by default, the categories template tag
wp_list_categories() creates markup with list items for that category that each include CSS class names which I don't need - BUT I can't find how to stop them from being generated.
Here's a quick example:
<ul id="categories"> <?php wp_list_categories('title_li='); ?> </ul>
This then generates (generically) the following markup:
<ul id="categories"> <li class="cat-item cat-item-1"><a href="#">Category name</a></li> <li class="cat-item cat-item-2"><a href="#">Category name</a></li> ... </ul>
As shown, I am using an ID on the containing UL, and therefore for my purposes I don't need those class attributes on the individual LIs. But WP just puts them in there anyway. This is not controlled by any Theme files, and I am searching through the widget.php template file for where this code bloat is generated but no luck.
Any ideas where the Category list items' bloated markup / class attributes are coming from, and how I can modify that?