WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the following code:

<?php if (the_post_thumbnail()) : ?>
    <div class="thumbnail">
    <?php the_post_thumbnail('thumbnail'); ?>
<?php endif; ?>

But the thumbnail is appearing full size. Same applies if I use (array(200,150)). My "Media" settings are set correctly (thumbnails at 288 max width, 500 max height); I've checked the uploads directory to see if the images have been resized and they have.

Any ideas?

share|improve this question
up vote 1 down vote accepted

Updated the answer to match my latest comment:

Changing <?php if (the_post_thumbnail()): ?> to <?php if (has_post_thumbnail()): ?> will probably solve things.

Also, some must have developer plugins when working with featured images:

share|improve this answer
Thanks mate. I installed the AJAX version instead in case I have to do this in future (we'll have 12,000+ images) but to no avail - same problem. – dunc Jan 14 '12 at 13:51
Sorry, I've misread the last bit of your question. Changing <?php if (the_post_thumbnail()): ?> to <?php if (has_post_thumbnail()): ?> will probably solve things. – Cor van Noorloos Jan 14 '12 at 14:13
Perfect! :) I'll accept your original answer, feel free to edit it to incorporate your latest comment. – dunc Jan 14 '12 at 14:20
Thanks :) I've updated the original answer. – Cor van Noorloos Jan 14 '12 at 14:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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