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

Display Post Thumbnail.


  • 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 );



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: Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: