Add multiple classes. Different style for each category tag
In order to add an specific class to each category using the_category, you need to hack your code a little bit. It will output the same result, but with a class added to each item. The class name will be the category slug. In your functions.php: add_filter(‘wp_list_categories’, ‘add_slug_class_wp_list_categories’); function add_slug_class_wp_list_categories($list) { $cats = get_categories(‘hide_empty=0’); foreach($cats … Read more