0

I'm using the following code:

<?php if (the_post_thumbnail()) : ?>
    <div class="thumbnail">
    <?php the_post_thumbnail('thumbnail'); ?>
    </div>
<?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?

1

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:

  • 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
  • 2
    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. – user5424 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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