0

Currently i have these lines in functions.php and my home page respectively:

add_theme_support( 'post-thumbnails' );
add_image_size( 'square', 252, 252, true );

//

if ( has_post_thumbnail()):
      the_post_thumbnail( 'square' );
    endif; 

Then regenerate thumbnails plugin resizes images to 252 x 252.

How do I display cropped thumbnail images and not featured?

Just to add , im using ACF custom fields plugin and part of that tinkers with the featured iamges, so it maybe possibly re-writing native logic in how to handle images. If anyone has been in a similar situation, please let me know if ou found a work around. Thanks!

1
  • The code looks correct. The issue must be somewhere else... Commented Aug 29, 2014 at 11:44

1 Answer 1

1

If I understand correctly, you can try with this code.

add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 252, 252, true);

//enter code here

if ( has_post_thumbnail()):

      the_post_thumbnail();

endif; 

OR

if ( has_post_thumbnail()):

      the_post_thumbnail(array(252, 252));

endif; 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.