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|bool) 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

Retrieve post thumbnail ID.

Related Functions

set_post_thumbnail, set_post_thumbnail_size, get_the_post_thumbnail, the_post_thumbnail, get_the_post_thumbnail_url

Top Google Results

User discussions

wpseek mobile