A WordPress-centric search engine for devs and theme authors



set_post_thumbnail_size ›

Since2.9.0
Deprecatedn/a
set_post_thumbnail_size ( $width = 0, $height = 0, $crop = false )
Parameters: (3)
  • (int) $width Image width in pixels.
    Required: No
    Default:
  • (int) $height Image height in pixels.
    Required: No
    Default:
  • (bool|array) $crop Optional. Whether to crop images to specified width and height or resize. An array can specify positioning of the crop area. Default false.
    Required: No
    Default: false
See:
Defined at:
Codex:

Registers an image size for the post thumbnail.



Source

function set_post_thumbnail_size( $width = 0, $height = 0, $crop = false ) {
	add_image_size( 'post-thumbnail', $width, $height, $crop );
}