the_post_thumbnail

Definition:
function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) {}

Display Post Thumbnail.

Parameters

  • int $size: Optional. Image size. Defaults to ‘post-thumbnail’, which theme sets using set_post_thumbnail_size( $width, $height, $crop_flag );.
  • string|array $attr: Optional. Query string or array of attributes.

Source code

function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) {

	echo get_the_post_thumbnail( null, $size, $attr );

}

3037

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: