Is there any plugin to set custom image size for different Post Type’s Thumbnail? OR How to set it?
blogdetailGo Back

Is there any plugin to set custom image size for different Post Type’s Thumbnail? OR How to set it?

May 21, 2014 | By August Infotech

USe MultiPostThumbnails WordPress plugins. // Add Multiple featured box thumbnails In CPT ITem if (class_exists(‘MultiPostThumbnails’)) { new MultiPostThumbnails(array( ‘label’ => ‘Logo’, ‘id’ => ‘logo’, ‘post_type’ => ‘ait-dir-item’ ) ); } // generate custom image size for that featured box add_image_size(‘ait-dir-item-logo-thumbnail’, 400, 160); add_image_size(‘ait-dir-item-search-logo-thumbnail’, 250, 85); // use it in your template file if (class_exists(‘MultiPostThumbnails’)) : […]

Is there any plugin to set custom image size for different Post Type’s Thumbnail? OR How to set it?

Is there any plugin to set custom image size for different Post Type’s Thumbnail? OR How to set it?

USe MultiPostThumbnails WordPress plugins.

// Add Multiple featured box thumbnails In CPT ITem
if (class_exists(‘MultiPostThumbnails’)) {

new MultiPostThumbnails(array(
‘label’ => ‘Logo’,
‘id’ => ‘logo’,
‘post_type’ => ‘ait-dir-item’
) );

}

// generate custom image size for that featured box

add_image_size(‘ait-dir-item-logo-thumbnail’, 400, 160);
add_image_size(‘ait-dir-item-search-logo-thumbnail’, 250, 85);

// use it in your template file

if (class_exists(‘MultiPostThumbnails’)) :
MultiPostThumbnails::the_post_thumbnail(get_post_type(), ‘logo’, NULL, ‘ait-dir-item-logo-thumbnail’);
endif;

CATEGORIES

CMS

TAGS

Thumbnail plugin Wordpress development
Contact Us

Let's get acquainted

Do you have everything it takes to transform your existence in the world of the web? Well, that’s why we are here, the white label web agency to be your guide. Make us a part of your core team and enjoy the reign of hits and wows. Be our Guest.

Get in touch
SVG Modal background

Don't just make a living
Make a difference, Take it higher

Close
Close

Get your
free quotation today