How to Add Automatic Read More TRICK for Blogger Blogs

How to Add Automatic Read More HACK for Blogger Blogs

Read More button or jump link is used cut the full article into two pieces and the First piece of Text and images display in the Homepage. When you create a post may be it includes long snippets and images that are too long, then what should you do? You have to add <!– more –> or click on Jump link to separate. Here I am going to show you how to Automatically put read more to Blogger posts. In this Automatic read more hack everything is automatic and you need not bother about the too long length of posts.Let us see how to do it.

 Features are

  • You can also limit the length of post
  • Set the size of Image, height and width separately
  • Disable Image
  • Sign In to Blogger Dashboard
  • Go to Template -> Edit HTML
  • Find </head>
  • copy the following code above it
<script type='text/javascript'>
var thumbnail_mode = "no-float" ; 
summary_noimg = 400;  /* Summary length if no image*/
summary_img = 300; /* Summary length with image*/
img_thumb_height = 200; /*Image Height*/
img_thumb_width = 200; /*Image Width*/
function removeHtmlTag(strx,chop){ 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+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>'; summ = summary_img; } var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>'; div.innerHTML = summary;}
</script>

If you add CSS codes to style jump link on your blog, then See the Update

  • Then Find (Ctrl+F)  <data:post.body/> and replace it with the following code
  • If you find more than one <data:post.body/> replace all occurrences.
<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 class='rmlink' style='font-weight:bold;padding:5px;float:right;text-align:right;'><a expr:href='data:post.url' >Read more...</a></span><a href="http://www.netoopsblog.com"><img src="https://1.bp.blogspot.com/-RikrI-c_pyQ/T2DTcP6aMvI/AAAAAAAAAL0/H6v7PVoHM_w/s1600/1x1juice.png"></a>
</b:if>
</b:if>
  •  Save Template.

UPDATE [17.01.2017]

In the above code, only a simple link to the post shows in the homepage. If you want to style that link or did you add css codes to style the jumplink, then add the following code instead of the above.

  • Then Find (Ctrl+F)  <data:post.body/> and replace it with the following code
  • If you find more than one <data:post.body/> replace all occurrences.
<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;'/>
<div class='jump-link'><a expr:href='data:post.url' expr:title='data:post.title' >Read more...</a></div><a href="http://www.netoopsblog.com"><img src="https://1.bp.blogspot.com/-RikrI-c_pyQ/T2DTcP6aMvI/AAAAAAAAAL0/H6v7PVoHM_w/s1600/1x1juice.png"></a>
</b:if>
</b:if>

Congratulations, You have done the trick to your Blog. I think you enjoyed this article.

67 Responses to “How to Add Automatic Read More TRICK for Blogger Blogs

Leave a Reply

Your email address will not be published. Required fields are marked *