has_post_thumbnail returns true on every post
has_post_thumbnail is acting weird, it returns true for every single post, even though most of my posts don’t have a featured image set. This is making it impossible for me to return another image for those posts that don’t have a featured image.
These other posts that don’t have any featured images have images attached to them inside the content, but they are not defines as featured images. Does has_post_thumbnail return true if there is a image file attached to the post? If so, is there any function that only returns true if the post has a Featured image?
- The topic ‘has_post_thumbnail returns true on every post’ is closed to new replies.