Site logo

Archived topic

Don't load a featured images if hidden

3 replies · Started by Matic on March 2, 2022

Viewing posts 1–4 of 4

Hi,

My blog posts have enabled featured images. However, in some posts I disable the featured images from the Editor by going to Layout > Disable Elements > Check Featured Image.

But in these posts the featured images load all the same--they're just hidden {display: none}.

Is there are a way to deque (not load) the featured image in these kind of posts other than creating a custom post?

I noticed that the image is loaded by do_action('generate_after_entry_title'); in the content-single.php. Do you think that I could write a php IF expr that would only load featured images that don't have them "hidden"? I don't know what to use as condition.

This indeed helped.

Thank you!

No problem :)

This archived topic is closed to new replies.