has_post_thumbnail ( $post = null )
- (int|WP_Post) post Optional. Post ID or WP_Post object. Default is global `$post`.
Defined at:Change Log:
- (bool) Whether the post has an image attached.
- Introduced in WordPress: 2.9.0
- Deprecated in WordPress: —
Determines whether a post has an image attached.For more information on this and similar theme functions, check out
the [Conditional Tags](https://developer.wordpress.org/themes/basics/conditional-tags/) article in the Theme Developer Handbook.