Core Function
View Source on Trac ↗ the_post_thumbnail()
the_post_thumbnail( mixed $size = 'post-thumbnail', mixed $attr = '' ) Displays the post thumbnail.
Parameters 2 required
| Name / Type | Description |
|---|---|
| mixed | (string | int[]) $size Optional. Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default 'post-thumbnail'. Required |
| (string | | array) $attr Optional. Query string or array of attributes. Default empty. Required |
Return Value
(void)
No return value description available.
Function Information
Since Version
2.9.0
Source File
wp-includes/post-thumbnail-template.php
Advertisement