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:
  • 4: .
  • 5: .

Description

Retrieves the post thumbnail ID.

Related Functions

set_post_thumbnail, set_post_thumbnail_size, get_the_post_thumbnail, the_post_thumbnail, delete_post_thumbnail

Top Google Results

User discussions

wpseek mobile