Filed under - WordPress
No Comments so far. Add yours now

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’);

Leave your comment

You must be logged in to post a comment.

Share IT © 2018. All rights reserved.