How would I show a sidebar only if the post (a custom post type) belongs to a specific category of that custom post type?
I was looking for something like:
if ( is_singular( 'my_custom_post_type' ) && in_category( 'my_custom_post_type_category' ) )
in_category doesn't seem to work. I tried with the category ID too, but no luck.
The theme uses the name
class_category as the main category for this custom post type.