It seems that if you add a cutsom taxonomy it doesn't automatically
add classes to the HTML body tag like it does with in-built
categories.
If fixed by adding this to my functions.php file, but should it happen
automatically in core?
function taxonomy_body_class( $classes ) {
if ( is_tax() ) {
$tax = get_query_var( 'taxonomy' );
$term = $tax . '-' . get_query_var( 'term' );
$classes = array_merge( $classes, array( $tax, $term ) );
}
return $classes;
}
add_filter( 'body_class', 'taxonomy_body_class' );
- Ben
_______________________________________________
wp-testers mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-testers