Change the thumbnail size for the Testimonial CPT.
Parameters
- $var
(string | array) Either a registered size keyword or size array.
Changelog
- Introduced in Jetpack 3.4.0
How to use this hook
Notes
You can use this filter to change the thumbnail size for posts displayed when using the Testimonial shortcode. You can use the filter to set any of the default sizes available with WordPress, or you can use a thumbnail size you’ve created yourself in your theme thanks to the `add_image_size` function. You can read more about this here. In the example below, we’ll switch from the default size (thumbnail) to large thumbnails:
function jeherve_large_testimonial_thumbnails() {
return 'large';
}
add_filter( 'jetpack_testimonial_thumbnail_size', 'jeherve_large_testimonial_thumbnails' );