This function will allow you to check if the current post or archive page is assigned a specific category. I use it often to apply category-based body classes and special styles for category archives.
Categories & Taxonomies
WordPress has a powerful library of taxonomy features. However, some tasks and problems require a bit of custom handwork on the developer's part to get just what you want from this toolset.
Here are a few solutions that I crafted up specifically for WordPress categories / taxonomies.