This list is automatically generated by WP. It lists the categories of you blog in the sidebar. And the classes are automatically applied by WP, they come from the classes.php file in the wp-includes folder.
Some code pasted here:
if ( 'list' == $args['style'] ) {
$output .= "\t<li";
$class = 'cat-item cat-item-'.$category->term_id;
if ( isset($current_category) && $current_category && ($category->term_id == $current_category) )
$class .= ' current-cat';
elseif ( isset($_current_category) && $_current_category && ($category->term_id == $_current_category->parent) )
$class .= ' current-cat-parent';
$output .= ' class="'.$class.'"';
$output .= ">$link\n";
} else {
$output .= "\t$link<br />\n";
}
I am no PHP programmer, but I have a good idea of what it can be done, and I suppose that you could create a function that would say...
if li is the first element in the list, then apply cat-item-first class on top of cat-item and cat-item-[X], where X is a number.
But again, I do not want to modify the classes.php file. I use thematic framework. I would like to add this function in the function.php file.
Possible?
Thanks.
Pat