get_post_thumbnail_id
get_post_thumbnail_id ( $post = null )
Parameters:- (int|WP_Post) post Optional. Post ID or WP_Post object. Default is global `$post`.
Returns:- (int|false) Post thumbnail ID (which can be 0 if the thumbnail is not set), or false if the post does not exist.
Defined at:Change Log: - Introduced in WordPress: 2.9.0
- Deprecated in WordPress: —
Description
Retrieves the post thumbnail ID.