Snippets: Custom Search Results Thumbnail Cropping

/* Sample function showing how to edit the search results featured image
 *
 * IMPORTANT: If your theme is up to date you can modify the search results image size via
 * the settings at Theme Panel > Image Sizes
 * 
 * Accepted params: width, height, crop, alt, size, attachment
 * @see framework/core-functions.php wpex_post_thumbnail() function
 */
function myprefix_wpex_search_thumbnail_args( $args ) {
	$args['width']  = '500'; // Edit accordingly
	$args['height'] = '500'; // Edit accordingly
	return $args;
}
add_filter( 'wpex_search_thumbnail_args', 'myprefix_wpex_search_thumbnail_args' );

Snippet Type: PHP

Posted Under: Search

All PHP snippets should be added via a child theme's functions.php file.