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|string) Post thumbnail ID or empty string if the post does not exist.
Defined at:
Change Log:
  • 4: .

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