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 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
It’s great Really helpful..
Tech Newss last blog post..Solid State Seagate
Hello. what did you use for your “Related Posts” at the bottom of the page? Thanks!
Iam using YARPP WP Plugin with a template.
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 🙂
@Tom : You can try to set the “TFE_SPACE” value in the plugin file which is the HSPACE parameter for the image.
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
background:url(images/content.png) top left repeat;
margin: 0px 8px 0px 0px;
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!
Thanks avinash – Your advice may be correct but i’m happy with using CSS now i have it figured out.
@Tom : Glad you were able to figure it out. All the best
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!
Is it possible to display the thumbnail image below the excerpt text? In the plugin code I changed
but it makes no difference.
Any help appreciated. Thanks!
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.
Nice, I was try it and success with WP 2.8.4, thanx
Very nice! Works exactly as described. Thank you!
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!
Thanks for the plugin, but my the have inbuilt option to fetch the thumbnail.
Thanks for this plugin. It really helped me out. I was using a similar plug-in called Get The Image but for some reason it was working – but yours did the trick!
Thank you a lot! It worked for us here at http://www.chillups.com
Our team highly appreciate your work.
Hi, I’m having trouble with thumbnail images at excerpt, I’m using Serene theme from Studiopress, the padding at aligment is fine, but the images catch the latest post images and appears all on homepage with the same images, the default image doesn’t work and if the post has a thumbnail by itself it double with image from the plugin.
what should I fix ? thanks
Thanks you for this article, I have been trying to get the excerpt with a picture in my website and I could not figure it out.
great plugin, I was looking for something like that a long time ago! the only thing I trying to change is to have a “read more” link at the end of the except post
thank you, plugin works!!
thanks mate it works perfectly in my case coz i was using Paglines free theme and unable to see thumbnails on front page
Thanks a lot! It works great!
Hey, can this be set to only act on a specific category. Example, if I have text posts I want to show up in full but other image heavy posts I want to be excert w/ thumbnails.
Josh, you can try creating a separate widget for this plugin and calling it where you require it in your theme.
checkout this tutorial on how to do it – http://www.recadesign.com/2011/how-to-createadd-widget-areas-in-a-wordpress-theme-detailed/
Wonderful, Used it and it worked well for me! Thanks for the open source!
Simply and clearly explained, liked it…
Hi, it doesn’t work to my site. I already install the plugin and activate. But there is nothing? what is the next step to do after I activate the plugin?
Hi there, thanks for sharing this plugin. This works perfectly on my site however the Read More does not show up below the excerpt 🙁 Can you please teach how to show the Read more? Thanks.
Thank very much