Site icon Catch Themes

Add image size

Hi, Sorry for my english and thank you very much for your work and all your themes. I'd like to know how to add a new image size on free catch responsive theme. I tried this code (and other) but it didn't work, the servor failed :
if ( function_exists( 'add_image_size' )) {
	add_image_size( 'header-size', 1200, 300, false );
}
add_filter('image_size_names_choose', 'my_image_sizes' );
function my_image_sizes($sizes) {
	return array_merge ( $sizes, array(
	'header-size' => __( 'Dimensions de l'image d'en-tete'),
	));
}
I wrote it in the functions.php file of my child theme. My aim is to have a new image size for my header picture. I don't know if it is necessary to add code in the header.php file. Thank you!
Exit mobile version