0

Is there any plugin or alternative method to hide featured images of all the posts falling under the same category? Please guide.

For example:

There's a website category:

abc.net/category/fruits Under this category the following posts are published Apple, Mango, Cherry, Orange

All the posts under fruits category have featured images, I want featured images of posts not to appear when someone visits this "category link". Please note that on my homepage I want the images to appear but not in category link.

2 Answers 2

0

You can use a different theme, or create your own child theme where you override the category template, but since every theme is coded differently, it's unlikely a plugin would be able to disable featured images on categories for every theme out there.

0

You could use css to hide the featured image for the specific catgeory

Eg:

.category-fruits .featured-image img {
  display: none;
} 

Use this post as a guide for various methods on how to target the specific category pages

https://www.wpbeginner.com/wp-themes/how-to-style-individual-categories-differently-in-wordpress/

Using PHP, find the code for displaying the featured image on single.php, and use an if statement to only display the image if it is not in category fruit, something like:

if( !has_category('fruit') ) { // put code for featured image here }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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