Solution:1
You can check if current post is in category by using
if( has_category('Deals') ) {
// do stuff here
}
If $post
global variable is set has_category('Deals')
will be ok. Otherwise you will need to pass post ID as second parameter. https://developer.wordpress.org/reference/functions/has_category/
P.S. If you are calling it in a loop it looks like you are trying to echo the same inline css multiple times. This will hide all .entry-thumb
s regardless of the category. So it may be better to add a class to your deal
posts and then use something like .deal .entry-thumb{ display: none; }
in your style.css.