Post thumbnail dependant on category
You could do this : $categories = get_the_category($post->ID); $cat = $categories[0]->cat_name; if ( has_post_thumbnail() && $cat == ‘news’ ) { the_post_thumbnail(‘medium’); } *EDIT: the code grabs the post category, line 2 grabs cat name from the object and I use it as a condition in if statement *