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 = "float" ;
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 == "item"'>
<data:post.body/>
<b:else/>
<b:if cond='data:blog.pageType == "static_page"'>
<data:post.body/>
<b:else/>
<div expr:id='"summary" + data:post.id'>
<data:post.body/>
</div>
<script type='text/javascript'>
createSummaryAndThumb("summary<data:post.id/>");
</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
Best Items - Best NonProfit WordPress Themes
Best Items - Recommended WordPress and Web Development Books
Best Items - Top notch Premium BuddyPress Themes
Best Items - Top Selling WordPress Themes From Themeforest
Best Items - Collection of Best Premium Portfolio WordPress themes
Best Items - Best WordPress Templates Made for Mobile and Tablet Visitors
Best Items - Best Real Estate WordPress Themes
-
wasim khan
-
Raajee
-
Junaid
-
Hand & House Massage
-
Ayush Chand
-
Lisa M. Jolley
-
http://graphicart-news.blogspot.com/ Maria
-
http://prohackingtricks.blogspot.com computer tricks
-
http://indonesianartnews.blogspot.com IndonesianArtNews
