This code works perfectly but it also displays the name of the categories on the top of the post in the front end which is not needed at all. How to modify this code so that it just adds the category name to the body class on single posts but does not display the name of the categories in the front end?
Hi! I tried the snippet with adding categories to single post body classes. Works great. Would it be possible also to do this with tags?
Let’s say I would like to give different styles of the mobile head (with css) on single posts based on a tag. All posts with ‘Orange’ tag gives them orange head when viewing them as single posts. ‘Yellow’ tag gives them yellow head etc.
And if possible I would like to use the same css class on an archive page or the blog page.