web statistics
Image 01 Image 02

Display Thumbnails For Excerpts On Homepage In WordPress Without Using Custom Fields.

17
Share |

Many bloggers are preferring excerpts to be shown on their homepages, but the problem is that you have to explicitly give the meta data in the custom field of the wordpress editor, for displaying the images on the homepage along with the excerpts, But the problem is with old blogs, where bloggers have not mentioned the meta-data and the process of giving the path for each post, is a very lengthy process now.

Here’s how you can display the first image inside your post, in the homepage beside the excerpt more easily, using the first image within the post.

1. Download the Thumbnail for Excerpts WordPress Plugin.
2. Unpack and Upload the ‘thumbnailforexcerpts’ directory to the ‘wp-content/plugins’ directory on your WordPress plugins directory.
4. Activate plugin.

thumbnail-for-excerpt

Thumbnail For Excerpts searches the post for the first image. If exists, than it will search for the thumbnail created by default by WordPress for the image, if it was uploaded from WP administration area. If not, it will show the scaled image.

You can as well customize the plugin, by editing the values in the plugin file.

  • “TFE_ALIGN”,”left|right” :  Image alignment
  • “TFE_SIZE”,”100″ :  The size of the thumbnail; if you set to 0 it will be the default size of your WP thumbnails, from admin area.
  • “TFE_MAXSIZE”,”yes|no” :  If yes, than the above indicated size will be used as maximum size for width and height; if no, than the above indicated size is used only to limit the width.
  • “TFE_SPACE”,”5″ :   HSPACE parameter of the IMG tag
  • “TFE_LINK”,”yes|no” :   if yes, the image will link to the post
  • “TFE_CLASS”,”imgtfe” :  the class for the thumbnail images; you can change it or use this class in you CSS file
  • “TFE_CREATETH”,”yes|no” : if yes, the images without thumbnails will have one created now (based on default values for thumbnail from admin area, or on TFE_SIZE if in admin area thumbnail size is set to zero
  • “TFE_TITLE”,”no|yes” If yes, it will use titles for pictures

You can find this plugin in action in the Homepage of this blog.

Thumbnail For Excerpt  :   Homepage ||  WP Plugin Directory ||  Download


Posted on 18th September 2008 by Avinash under category WordPress, Wordpress Plugins


17 Responses to “Display Thumbnails For Excerpts On Homepage In WordPress Without Using Custom Fields.”

  1. [...] Ich habe mir heute mal intensiv ein paar Plugins für WordPress angesehen, die beide ganz nett sind aber meine Probleme nicht lösen (YAPB und Thumbnail-for-Excerpts). [...]

  2. Tech News says:

    It’s great Really helpful..

    Thanks

    Tech Newss last blog post..Solid State Seagate

  3. Rodolfo says:

    Thank you for the post.

    Rodolfos last blog post..Green Nature PPT

  4. Tom says:

    Hi there, thank you very much for this post – very useful.

    One question, How might i add padding to the thumbnail image in the excerpt version of the post? It is aligned left but the post text is touching the edge of the image and i want a nice gap between the two – this is blatantly a n00b question but i would love some help regardless :-)

    Many thanks

  5. Tom says:

    Solved my orn problem by reading the readme – and learning how to create a new class in the CSS

    for anyone as noob as me – just create something like this in your css file

    .imgtfe {
    background:url(images/content.png) top left repeat;
    margin: 0px 8px 0px 0px;
    padding: 5px;
    border: 1px solid #E6E6E6;
    }

    then edit at will
    - that code gives the image a background (change link to suit),
    - it sets the text 8px to the right of the thumbnail
    - gives 5px of padding around the
    - 1px border

    You wont want all of that, or you might, but its better to have more and takeaway than be stuck with nothing.

    Hope it helps someone and thanks again for the post and plugin!

  6. Tom says:

    Thanks avinash – Your advice may be correct but i’m happy with using CSS now i have it figured out.

    Cheers though!

  7. Alex G says:

    Hi Avinash,

    Great plugin, thanks very much. I am having one problem: if my thumbnail size is set in the admin area to something of unequal dimensions – like 200 x 100 – then the excerpts don’t generate correctly. The image width is set correctly, but not the height.

    I did reset TFE_SIZE to 0 but this doesn’t seem to help. Any ideas? Hope it’s not something I’m doing wrong!

  8. Cheese says:

    Is it possible to display the thumbnail image below the excerpt text? In the plugin code I changed
    return $img.$excerpt;
    to
    return $excerpt.$img;
    but it makes no difference.

    Any help appreciated. Thanks!

  9. Cheese says:

    Just looked at the code again and it seems return $img.$excerpt; only returns the excerpt text. $img doesnt do anything and is never initialised. If you want the image below the excerpt you have to echo $excerpt at the top of the function and then let the function output the image as normal. $img does nothing.

  10. [...] to the RSS feed for updates on this topic.Powered by WP Greet BoxI’ve shared a plugin called Thumbnail For Excerps that let you show thumbnails in your blog’s homepage using wordpress blogging platform.Here’s [...]

  11. zoel says:

    Nice, I was try it and success with WP 2.8.4, thanx

  12. Bethany says:

    Very nice! Works exactly as described. Thank you!

  13. slogans says:

    Hi, thanks for the post, I am trying to modify this plugin to work on my slogans blog. I have it working but I want to move the thumbnail so that it is displayed the slogan (which is the post title) any idea how I might do this? Anyway, thanks again for the helpful post!

  14. Thanks for the plugin, but my the have inbuilt option to fetch the thumbnail.

  15. Thank you a lot! It worked for us here at http://www.chillups.com
    Our team highly appreciate your work.

Leave a Reply


Web Informer Button