Use first imagein post for thumbnail (3 posts)

  1. zeaks
    Posted 5 years ago #

    Anyone know of a tutorial or code snippet on how I can use the first post image for a thumbnail when using excerpts? If there is no image it will just not display an image and not use a default thumbnail if there isn't? With the ability to resize the image in the excerpt.

    I know how to use the featured image as a thumbnail, but sometimes I want the featured image displayed in the post and I need to post it twice to show both.

    I've searched Google and these forums for a couple hours, tried 10-15 tutorials on how to do this and haven't found one that works the way I want.
    This was as close as I could find to what I needed, but also the only one I couldn't get to work. http://wordpressapi.com/2010/02/01/image-thumbnail-wordpress-post-wordpress/

  2. 123milliseconds
    Posted 5 years ago #

  3. zeaks
    Posted 5 years ago #

    Thanks for these, but two of those require the use of a plugin, the other uses custom fields. I'm sure there's a way to accomplish this without using either.
    It's just that each tutorial I find, either requires a default image, or there's no options to define a thumbnail size.

Topic Closed

This topic has been closed to new replies.

About this Topic