Are your readers complaining about your post been too long or saying that you should please find a way to shortening your post? i have got a great news for you. Actually, it happens that when i opened created this my blog, all my post are publishing in a long format, and people keep telling me because it lengthens the height of your blog and scare your readers away.
But how can you add read more in an automatic way to your blog post, and which is going to keep your readers coming the more. Here am going to tell you the steps and how to add the automatic read more in your edit HTML template. Follow the steps below.
* log into blogger
* click on edit html
* check Expand Widget Template
* Look for code </head> (for fast find ctrl + F)
* put this code above </head>
THE CODE
<script type=’text/javascript’>
var thumbnail_mode = "float" ;
summary_noimg = 300;
summary_img = 250;
img_thumb_height = 50;
img_thumb_width = 50;
</script>
<script type=’text/javascript’>
//<![CDATA[
/******************************************
Auto-readmore link script, version 2.0 (for blogspot)
(C)2008 by Anhvo
visit http://en.vietwebguide.com to get more cool hacks
********************************************/
function removeHtmlTag(strx,chop){
if(strx.indexOf(“<“)!=-1)
{
var s = strx.split(“<“);
for(var i=0;i<s.length;i++){
if(s[i].indexOf(“>”)!=-1){
s[i] = s[i].substring(s[i].indexOf(“>”)+1,s[i].length);
}
}
strx = s.join(“”);
}
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=’ ‘ && strx.indexOf(‘ ‘,chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+’…’;
}
function createSummaryAndThumb(pID){
var div = document.getElementById(pID);
var imgtag = “”;
var img = div.getElementsByTagName(“img”);
var summ = summary_noimg;
if(img.length>=1) {
imgtag = ‘<span style=”float:left; padding:0px 10px 5px 0px;”><img src=”‘+img[0].src+'” /></span>’;
summ = summary_img;
}
var summary = imgtag + ‘<div>’ + removeHtmlTag(div.innerHTML,summ) + ‘</div>’;
div.innerHTML = summary;
}
//]]>
</script>
*Then you click save template
*Also look for code <p><data:post.body/></p> and change it to the code below
<b:if cond=’data:blog.pageType != "item"’>
<div expr:id=’"summary" + data:post.id’ style=’text-align: justify;’>
<p><data:post.body/></p>
</div>
<script type=’text/javascript’>
createSummaryAndThumb("summary<data:post.id/>");
</script>
<a expr:href=’data:post.url’ style=’float:right;padding-top:10px;’>[Read More…] – <data:post.title/></a>
</b:if>
<b:if cond=’data:blog.pageType == "item"’>
<p><data:post.body/></p>
</b:if>
Then also click on save template, then go to your blog post after you reload and see the effect. Thanks for turning with us at this moment, please share this post for others to benefit and also subscribe for our daily update via the box below. thanks
Enter your email address:
Delivered by FeedBurner
Leave a Reply
You must be logged in to post a comment.