Image on a post as a thumnail on the homepage

Discussion in 'WordPress' started by radiant_luv, Jan 24, 2011.

  1. #1
    I want to add an image to a post and I want the same image to be appeared on the homepage as an thumbnail. Basically, I am working on theme from WooThemes, I want to post an image to a post (not as a featured image) and I want that image to appear on the home page. Is there a way to do this?

    Thanks
     
    radiant_luv, Jan 24, 2011 IP
  2. teamnirvana

    teamnirvana Active Member

    Messages:
    844
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    60
    #2
    teamnirvana, Jan 24, 2011 IP
  3. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Create your own home.php template and add the thumbnail code into it. With WordPress' feature image for posts/pages you can set the thumbnail from the edit screen.

    You would basically add this code inline with your the_excerpt() or the_content() area inside the Loop:

    <?php echo get_the_post_thumbnail($post->ID, 'thumbnail'); ?>
    Code (markup):
    More information and options for this function on the get the post thumbnail page in the WordPress Codex.
     
    Dodger, Jan 24, 2011 IP
  4. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #4
    @Dodger, Thanks. I will have a look at that link. I'm sure this will take time to understand as I am bit weak when it's server side scripting. However, I will give a try.
     
    radiant_luv, Jan 24, 2011 IP