Style Taxonomy Posts?
-
Is there a way to add a Body Class type to posts under a taxonomy category? I’d like to use CSS to style each post within specific groups, but can’t seem to find the proper code.
The below related links seem to get me CLOSE to the solution, either styling posts within a category, or the archive listing of taxonomies. But nothing I’ve seen explains how to hook on to posts within the taxonomy categories (e.g.; the custom taxonomy is “animals”, the group is “dogs”, and I’d like to have all posts under the “dogs” group to have a “dogs-single” body class I can style).
https://davebonds.com/blog/add-css-classes-for-custom-taxonomies-in-wordpress.html
https://dev.studiopress.com/dynamic-body-classes.htm
https://www.benhuson.co.uk/2010/06/24/wordpress-taxonomies-body-classes/#comment-129864
https://www.wptavern.com/forum/troubleshooting/1758-custom-taxonomy-css-class.html#post17171
- The topic ‘Style Taxonomy Posts?’ is closed to new replies.