Been walking around with my problem now for days and i decided to just go ahead and ask it.

My theme is set that a featured image is not shown in a post, which is what i want. The problem is, in 1 category, i don't want this.

So, what do i have to do so that if i set a featured image, it shows in the post. But ONLY for 1 specific category?


  • Please show us your code. – kaiser Jul 28 '13 at 11:13

You can use in_cateogry function to check if the current post is in your special category. And if it is, you can then display the featured image. Something like:

if( in_category( 'YOUR CATEGORY ID OR SLUG', get_the_ID() ) ){

Obviously replace 'YOUR CATEGORY ID OR SLUG' with proper value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.