Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have looked everywhere but I cant see any clear answers, a lot about getting a thumbnail image. But I am after having the thumbnail which was uploaded to the post to also be in the post just made.

So it automatically puts the image in the post (top left corner for example)

Thank you

share|improve this question
    
Why not just display the post thumbnail on the single.php template? This way the layout always stays perfect. –  Pippin Jul 27 '11 at 15:16
    
@Pippin you should post that as an answer. –  Chip Bennett Jul 27 '11 at 15:20
add comment

1 Answer

Use the post thumbnail for the single blog pages too. You can use the add_image_size() function to create an additional image size that is displayed on the blog posts.

add_image_size('single-post-image', 650, 250, true); // name, width, height, crop mode

Then in single.php

the_post_thumbnail('image-size');

Simply place the first function in your functions.php, and the second in single.php. You can then wrap it with whatever you want to control the formatting. This way your formatting will always be perfect and you don't have to worry about sizing images exactly: they're all done for you.

share|improve this answer
add comment

Your Answer

 
discard

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.