1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
//adds new body class for post category add_filter('body_class', 'add_category_class_single'); function add_category_class_single($classes){ global $post; if(is_single()) { $category = get_the_category($post->ID); $slug = $category[23]->slug; $classes[] = 'post-category-video' . $slug; } return $classes; } |