atul1039
atul1039

Reputation: 143

Small thumbnail image not appearing in wordpress meta-grid plugin

Thumbnail image is inside Media-Grid plugin -> Grid Builder -> select any grid from grid list ->small thumbnail image in front of 'select an item' drop down list

Thumbnail image not appear online but work fine locally. Can you please tell me where to start ? here is image enter link description here

Upvotes: 0

Views: 110

Answers (1)

Krunal Shah
Krunal Shah

Reputation: 2101

For cropping thumbnail image, you it would not a proper way to use plugins:

Try with this code, it will helps you for all the rest of thumbnails in your whole site...

Put this code in your function.php file

if ( function_exists( 'add_image_size' ) ) { 
    add_image_size( 'custom-post-thumb', 140, 140,true );
}

Now use this in your code:

<?php if ( has_post_thumbnail()) : ?>

 <?php the_post_thumbnail('custom-post-thumb', array('class' => 'attachment')); // here array('class' => 'attachment') apply if you want to apply class to that anchor tag ?>

<?php endif; ?>

Thanks

Upvotes: 1

Related Questions