Featured image not appearing in posts

Using this code:

.page .entry-thumbnail {
display: none;
}

.page:not(.page-template-template-layout-portfolio) .entry-featured,
.single-post .entry-featured {
display: none;
}

I got the desired outcome of the featured image not appearing on the top of static pages. I would, however, wish that they do appear in content at the head of posts (like on portfolio items). Can you modify for me so the featured images on posts do display but still not display on static pages?

Website Homepage Correct: https://www.gulfbreezerecovery.com/
Post Page Missing w/out the featured image which I wish to show: https://www.gulfbreezerecovery.com/understanding-methamphetamine-addiction/

Hello @vxrworks,

Please try this code instead:

.page-template-default .entry-featured {
    display: none;
}

Kindly note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates. If you are uncertain how to proceed, it would be best to get in touch with a developer.

Hope this helps.

Oh my goodness, worked so good! Thanks!

You’re welcome. :slight_smile:

For some reason still getting image on this page: https://www.gulfbreezerecovery.com/medically-supervised-private-detoxification/

Hello @vxrworks,

The code previously suggested works for pages where you set the template as Default Template since pages that are assigned to that template gets the class page-template-default.

As for this page: https://www.gulfbreezerecovery.com/medically-supervised-private-detoxification/ it is using the Layout - Fullwidth template that is why the code previously added didn’t work.

So you will have to write another selector that will target the pages that uses the Fullwidth template and update the code previously provided.

Hope this helps.

Thank You!

You’re always welcome @vxrworks!

Cheers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.