WordPress at a glance

delete_post_thumbnail() WP 1.0

Remove a post thumbnail.

No Hooks.


true/false. True on success, false on failure.


delete_post_thumbnail( $post );
$post(int/WP_Post) (required)
Post ID or post object where thumbnail should be removed from.

Code of delete_post_thumbnail: wp-includes/post.php VER 5.0.1

function delete_post_thumbnail( $post ) {
	$post = get_post( $post );
	if ( $post )
		return delete_post_meta( $post->ID, '_thumbnail_id' );
	return false;

Related Functions

From tag: Thumbnail (images)

More from category: Thumbnails

No comments
    Hello, !     Log In . Register