how to add thumbnail in WordPress homepage post

This tutorial explain on how to add thumbnails in your wordpress homepage post.

Heres how:

1. Back up your theme files
2. In your theme files open home.php or index.php
3. Fine this line :

  1. <?php while (have_posts()) : the_post(); ?>  
  2. … 
  3. <?php endwhile; ?>  

Inserted ANYWHERE with in the while loop above of your theme:

  1. <img src=”<?php echo get_post_meta($post->ID, ”thumbnail”, true);?>” />  

This outputs an image, using the Value of the Key, “thumbnail”, which we’ve inserted into our post.

4. Login to your WP admin
5. Edit or add new post then click the add an image button see the image below:
click-add-image-button

6. Upload your thumbnail.

select-files-button


open-upload-button

7. Copy File url

file-url-button




copy-link-url

8. Create a new custom field name “thumbnail” all small caps. Copy the link irl to the value field.

enter-new-field

value

9. Update or publish your work.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Furl
  • Reddit
  • Smarking
  • StumbleUpon
  • Technorati
  • TwitThis
  • YahooMyWeb
  • Simpy
  • Propeller
  • Fark
  • LinkedIn
  • Live
  • Mixx

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment