Archived topic
Disable Featured Image on Posts
5 replies · Started by Hermann on October 22, 2021
Hello, I have tried to disable featured image on certain posts but cannot seem to get it to work. I have tried disabling the featured image via Customising-Layout, the featured image section still shows. I tried in the Disable Elements field in the post, same thing the featured image still shows. The test website I am working on is http://www.delazing.com.
Please help...
Hi Hermann,
Do you want to disable the featured image on the home page?
Your home page is a static page, it's using WP show posts (a plugin) to add the posts.
It's not the default blog page, so customizer options or layout element won't work.
You should be able to remove featured image in the plugin settings:
https://docs.wpshowposts.com/article/images-overview/
Hello,
I am trying to disable the featured image on some posts articles. For instance this one here
https://www.delazing.com/2021/10/22/testing-featured-image/
Thanks
It's using a block element to create the page hero.
Can you go to appearance > elements and look for a block element - page hero which is assigned to posts?
You can add the specific post to the Exclude list in display rules so the page hero won't apply to that post.
Or you can try this PHP snippet, so the element won't apply when there's no featured image for a post:
https://docs.generatepress.com/article/generate_element_display/#remove-an-element-when-no-featured-image-is-uploaded
You can find the element ID in element editor, in my case, the ID is 177:
https://www.screencast.com/t/nXpSbeZNJ
Awesome!!! As always your support is World Class.
Thank you!!!!
Glad to hear that :)