Function: delete_post_thumbnail

delete_post_thumbnail( integer | WP_Post $post )

Remove a post thumbnail.

Parameters

Name Type(s) Default Value Description
$post integer | WP_Post

Post ID or post object where thumbnail should be removed from.

Returns

boolean

True on success, false on failure.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.