WordPress – change existing featured image size in child theme

Jun 22, 2015
admin

The simplest way to create your own sizes inside your child theme is to remove using “remove_theme_support” and set it again “add_theme_support” like following:

function remove_featured_images_from_child_theme() {

// This will remove support for post thumbnails on ALL Post Types
remove_theme_support( 'post-thumbnails' );

// Add this line in to re-enable support for just Posts
add_theme_support( 'post-thumbnails', array( 'post' ) );
// Thumbnail sizes

add_image_size('portfolio-list', 500, 500, true);
add_image_size('blog-list', 500, 500, false);
add_image_size('gallery-s', 185, 185, true);
add_image_size('gallery-m', 220, 220, true);
add_image_size('gallery-l', 276, 276, true);
add_image_size('carousel-thumb', 200, 140, false);
}

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *