Top Menu

How to Add Post Summaries With Thumbnail in Blogger Blog


In previous posts i have explained about ‘Expandable post summaries using javascript’ and simple expandable post summaries.

Those Read More! hack have some drawbacks like –
* No thumbnail created
* Need manual setup – If you already have some posts in your blog and going to use those hacks, than you need to alter all the post manually. This is the big drawback
* Later one is quite similar to this hack but that will not create thumbnail and you don’t have control on the post summary content.

For these reason this is the hack for you. After implementing this hack in your blog, all the posts will automatically display post summaries in the home page.

Below is the snapshot how the post summary and the thumbnail is created and displayed.

How to setup :

1. Login to Blogger Dashboard

2. Go to Design >> Edit HTML >> Check ‘Expand Widget Templates’

3. Now find </head>

4. Replace it with following code.

<script type='text/javascript'>  
var thumbnail_mode = &quot;float&quot; ;
summary_noimg = 250;
summary_img = 140;
img_thumb_height = 100;
img_thumb_width = 100;
</script>
<script src='http://blogergadgets.googlecode.com/files/excerpt.js' type='text/javascript'/>
</head>

5. Now find <data:post.body/>

6. Replace it with following code

<b:if cond='data:blog.pageType == &quot;item&quot;'>     
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<data:post.body/>
<b:else/>
<div expr:id='&quot;summary&quot; + data:post.id'>
<data:post.body/>
</div>
<script type='text/javascript'>
createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);
</script>
<div style='clear: both;'/>
<span style='padding-top:5px;;float:right;text-align:right;'><a expr:href='data:post.url' rel='bookmark'><b>Read more >></b></a></span>
</b:if>
</b:if>

Customizing :

summary_noimg = 250;
This is the number of characters shown if the post does not contain any image.

summary_img = 140;
This is the number of characters shown if the post contains image.

img_thumb_height = 100;
Height of the thumbnail created.

img_thumb_width = 100;
Width of the thumbnail created.

You are done. Now all the post should contain thumbnail and the post summaries in the home page or in the post pages.

Best Items - Best Restaurant WordPress Theme

Collection of best Premium restaurant WordPress themes ready to be used for your and client projects.
FIND OUT MORE

Best Items - Best NonProfit WordPress Themes

Are you looking for WordPress themes for Nonprofit organisation such as Churches, Charity or Environmental? Find top quality WordPress themes designed specifically for Churches, Charity, Politicians, Environmental and etc.
FIND OUT MORE

Best Items - Recommended WordPress and Web Development Books

Want to learn IN and OUT of web development and become professional web developer? Here are the list of WordPress and Web Development books which i recommend you to start with.
FIND OUT MORE

Best Items - Top notch Premium BuddyPress Themes

Are you looking for best premium WordPress themes which are BuddyPress ? Head over to Premium BuddyPress Themes for top quality and responsive designs.
FIND OUT MORE

Best Items - Top Selling WordPress Themes From Themeforest

Want to use one of the top selling WordPress theme for your next project?   Here is the list of Premium WordPress items from Blog, Magazine, Creative, Retail, Technology, Entertainment, BuddyPress, eCommerce and Nonprofit categories.
FIND OUT MORE

Best Items - Collection of Best Premium Portfolio WordPress themes

Need to showcase your project work in a stunning way? These premium Portfolio WordPress themes will make your work easy for you. Perfect for showcasing Project, Photography, Video and Art work.
FIND OUT MORE

Best Items - Best WordPress Templates Made for Mobile and Tablet Visitors

Collection of Premium WordPress templates to take your website to the next level. Use these themes on your project to reach out Mobile and tablet users. Grow your business and traffic instantly.
FIND OUT MORE

Best Items - Best Real Estate WordPress Themes

Need to design Real Estate Website for your client ? These collection can make your life easy while developing Real Estate websites for your client. Choose from wide verity of WordPress templates and make your own unique design.
FIND OUT MORE
  • wasim khan

    Hi, That's great. I really like your new post. Thanks.

  • Raajee

    Hi, Wasim, Happy blogging!

  • Junaid

    this is nice…

  • Hand & House Massage

    good job really,, been very helpful

  • Ayush Chand

    Thank you!

  • Lisa M. Jolley

    Thank you! Is there a way to keep the images from skewing? Can I lock only the width?

  • http://graphicart-news.blogspot.com/ Maria

    Hi, I really loved it but I would need a percentage thumbnail, because if i use exact pixels i have deformed images. Is their any solution for that?

  • http://prohackingtricks.blogspot.com computer tricks

    this is cool. thanks for sharing

  • http://indonesianartnews.blogspot.com IndonesianArtNews

    Thank you for sharing this post, I have to practice on my blog, and have succeeded .. :)