JoeHana
10/4/2016 - 10:39 PM

Define custom image sizes for Sylt Theme

Define custom image sizes for Sylt Theme

<?php

/**
 * Define custom image sizes for Sylt Theme
 */

add_filter( 'wpsight_madrid_image_sizes', 'custom_madrid_image_sizes' );

function custom_madrid_image_sizes( $image_sizes ) {
	
	$image_sizes = array(

		'post-thumbnail' => array(
			'size' => array(
				'w' => 340,
				'h' => 227
			),
			'crop'  => true,
			'label' => __( 'small', 'wpcasa-madrid' )
		),
		'wpsight-half' => array(
			'size' => array(
				'w' => 540,
				'h' => 360
			),
			'crop'  => true,
			'label' => __( 'half', 'wpcasa-madrid' )
		),
		'wpsight-large' => array(
			'size' => array(
				'w' => 740,
				'h' => 490
			),
			'crop'  => true,
			'label' => __( 'large', 'wpcasa-madrid' )
		),
		'wpsight-full' => array(
			'size' => array(
				'w' => 1140,
				'h' => 760
			),
			'crop'  => true,
			'label' => __( 'full', 'wpcasa-madrid' )
		),
		'wpsight-slider' => array(
			'size' => array(
				'w' => 2000,
				'h' => 1333
			),
			'crop'  => true,
			'label' => __( 'slider', 'wpcasa-madrid' )
		)

	);	

	return $image_sizes;
	
}