Add category name as body class

I order to give the categories differently styling I would like to add the category name as body class. How to do that?

Thank you for helping.

Yours
Stephen

Hi There,

Thanks for writing in!

To add different class name for each category in body, no need to do any thing. As WordPress by default add the class name according to the category or tag name.

Please let us know if you have any other concern!

Thanks

Ok, on the single Portfolio page there is no class given to “body”, but I found one given to “article”. Thanks for your very quick reply.

Hi There,

Single portfolio and article adds the class name as post Id Ex. "postid-455"

Hope this is clear to you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.