Disable feaured image on custom post type

Hi,

I’m looking for a way to disable featured images showing in the posts for a custom post type. I’d like them elsewhere in my site though. I have a child theme set up, and I know (or think I know which file(s) to edit but how do I go about this?

There’s a plugin that allows you to disable the featured image on individual posts etc, but there’s about 500 posts in this custom post type, so there has to be an easier way?

Just to be clear, I just want the featured images hiding on the post itself, not to remove the functionality as it would break the related posts thumbnails etc.

It’s because the content of these posts contains the same image as the featured image, so at the moment it’s a duplication of images.Removing the images from the post content isn’t an option.

Hi,

Please post a link to one of your posts, so I can give you a working Custom CSS to remove the featured images from all of your posts ( post content ).

Kind Regards,
Csaba

Hi,

II did say I don’t want it removing from all of the posts, just the ones with a certain custom post type. I tried a CSS method which removed it, but removed it from all other post types as well, it seems it’s generic.

Here’s a link to a custom post

https://www.jwfsanctuary.club/wpdm-package/truchetae-randomizer-bs/

But, I’d still link the featured image in the post for other types, can’t emphasise this enough. :slight_smile:

Something like if post type = “mycustom” don’t display featured image in post etc.

Thanks…

Hi,

Yes, I understood I’ve meant to remove from all posts from that post-type, you can remove the featured image of that post type with this Custom CSS:

.single-wpdmpro .content-area .entry-thumb {
    display: none !important;
}

Please add the above CSS to your Child Theme’s style.css or in case you haven’t setup a Child Theme already, then you can also add the CSS to wp-admin -> Appearance -> Customizer -> Additional CSS so you won’t loose the changes after Theme or WordPress updates.

Please let me know how it works.

Kind Regards,
Csaba

Thank you so much for the css, I had no idea you could do that adding a hyphen and the plugin custom post name? Very useful.

Again, thanks.

Hi,

Great! You’re most welcome! If you need help with anything else, please open a new topic.

Have a nice day!

Kind Regards,
Csaba