Click now for free estimate
blogdetailGo Back

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

May 20, 2014 | By August Infotech
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;

Related Blog

Get in touch

Our website address

Blog Page

CATEGORIES

AI and MLWeb Application

TAGS

Thumbnail plugin Wordpress development
Contact Us
SVG Modal background

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

Close
Close

Get your
free quotation today