PHP

Paste into your child theme's functions.php file

Click to copy
/**
 * Overwrite default image sizes added by the MD theme.
 */
function md_child_theme_image_sizes( $sizes ) {
	$sizes['md-banner'] = array(
		'width' => 1000,
		'height' => 500
	);
	return $sizes;
}
add_filter( 'md_filter_image_sizes', 'md_child_theme_image_sizes' );

Change Default MD Image Sizes

MD comes with a set of image sizes that are used to size certain images around your site, like the featured image for example. You can change the image size pixel values of those sizes with the convenient md_filter_image_sizes.

Here are the default image sizes in MD:

	$sizes = array(
		'md-full' => array(
			'width'  => 1118,
			'height' => 350
		),
		'md-banner' => array(
			'width'  => 600,
			'height' => 250
		),
		'md-image' => array(
			'width'  => 325,
			'height' => 425
		),
		'md-thumbnail' => array(
			'width'  => 80,
			'height' => 80
		)
	);

Start Building Websites That Delight

You can use the Marketers Delight WordPress Theme on unlimited sites. New features & updates are delivered to sites with your active license key.

Add to Cart

Start building your website with MD now

Get started with MD today. Pay once for use on unlimited websites.
* Save 40% on license key renewals every 12 months. Get auto-updates sent to 5 websites.