Hide featured images

Hi,

I’ve found that the following code works well for hiding featured images in single blog posts

.single-post .wp-post-image {
display: none !important;
}

however, is there a way to hide the featured image for pages as well?

(my website is not online yet)

All the best,
Alessia.

Good morning

if you want to hide featured images from your site use this code:

.wp-post-image {
display: none !important;
}

Hi Noda! thank you for your reply.

I should have been clearer, my bad. Your code hides all featured images, even those in the main blog page and I want to keep them.
Is there a way to hide featured images according to page id instead?

(website not online yet)
Best,
A.

Good evening

“Is there a way to hide featured images according to page id instead?” - ah, yes sure, you can use this code:

.post-id-XX .wp-post-image {
display: none !important;
}

instead of XX you need to use the post ID number

It worked a treat, thank you Noda!

Thank you too :slight_smile:
I will close this case now, Feel free to contact us again if you have other questions