How to add category id to WordPress body and post class

Snippets WordPress
Please Rate this ..

This snippet is very handy if you wish to add the category ID to the body or post class for ex. targeting CSS styles and such.

Instructions
Add this to your functions.php file.

1
Leave a Reply

avatar
0 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
0 Comment authors
Recent comment authors
  Subscribe  
newest oldest most voted
Notify of