Add Taxonomy Terms as CSS Classes to a Post

add-tax-terms-css-posts

You can use the body_class filter in WordPress to add the Taxonomy Terms of a Custom Taxonomy as CSS classes to a post. The CSS class appears in the body element and is only used if the post has been assigned to the taxonomy. The code goes in your functions.php file.   add_filter( ‘body_class’, ‘themeprefix_add_taxonomy_class’…

Read More