Add CSS classes to post categories to allow for styling them.
A member of the Genesis WordPress facebook group asked about changing the colours of the post categories listed above a post.
I searched the Genesis theme source and found that it used get_the_category_list() to generate the list of post categories. I looked through the source code and, surprisingly, there are no filters to control the returned markup (except the final list that would take a lot of work to parse).
I looked at the get_the_category() function and saw that it returned an array of category information. A quick experiment with that function showed me the data it returned.
Replace default Genesis code
In Genesis the default post meta is generated by two shortcodes: [ post_categories ] [ post_meta ]
I changed the shortcodes to use a custom shortcode. My code adds three classes: cat, cat-$slug and cat-parent or cat-child. Much of the code is copied from the Genesis genesis_post_categories_shortcode().
Adding the custom shortcode might make it less flexible but I could not think of a different implementation. One enhancement might be to remove_shortcode( ‘post_categories’ ) and then add_shortcode( ‘post_categories’, ‘dcwd_get_the_category_with_classes’ ).
The code adds some styles to show that the CSS classes have been added.