OK so what you’re doing is to echo the image, but that doesn’t “crop” the image….the image gets cropped/resized as you upload it to WP using the Media Uploader.
Check your Settings >Media to see what you have set there – those are the sizes that WP will create, and it does it’s best to crop an image in a sensible way to fit those dimensions.
If none of those are 250 by 250, you can add optional image sizes by following these instructions:
http://codex.wordpress.org/Function_Reference/add_image_size
Or there are plugins that add additional “thumbnail” sizes as you upload, giving you more display options.
I hope this helps 🙂
Hi Trisha, Thank you for responding.
I did read somewhere that there is a way to crop images that are already in the media library, so that you don’t have to upload them again.
My other dilemma is that I have resizing/cropping set on each of the posts (large rectangular images above the header of each post), and I’m afraid this will mess up that portion.
So, I guess, my problem is I need 2 thumbnails. One that’s very large, and the other that is 250×250 that will fit on the home page.
I have this in my functions that would add this already…
add_image_size( 'col1-other-posts', 250, 250, true );
I must be doing something wrong with the PHP code.
This is my entire code that does the loop on the home page.
<ul class="home-col1-other-posts">
<?php
$catquery = new WP_Query( '/*cat=6*/&posts_per_page=4&offset=1' );
while($catquery->have_posts()) : $catquery->the_post();
?>
<li>
<div class="col1-border"></div>
<div class="col1-thumbnail"><a href="<?php the_permalink() ?>" rel="bookmark"><?php echo get_the_post_thumbnail($post_id, 'col1-other-posts');
?></a></div>
<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="col1-author">by <?php the_author(); ?></div>
</li>
<?php endwhile; ?>
</ul>