How to Extend Post Summary in Minima Blogger Template?

How to Extend Post Summary in Minima Blogger Template?
minima post summary

Blogger template use might see template with auto readmore code display only image thumbnail and summary. In most of the custom template we can increase and decrease the number of text in post  summary. But there are many template displaying only post summary with 1 or 2 lines. Specially in Minima type template you will see this. Because of for fast loading in minima template display short post summary. That means post summary with few text on Blogger home page. And there are not any option to increase text on post summary. But by using an universal auto readmore code we can easily increase the number of post summary. So I am going to share the trick here. Just follow the below steps-



short summary
Before

post snippet
After

Step 1 Log in to your Blogger Account and Go to your Blogger Dashboard

Step 2 Click on  Now click on -> Template -> Edit HTML->

Step 3
 Now Find the code like below


<div>
   <data:post.snippet/>
   </div>
   <a class='readmore' expr:href='data:post.url + &quot;#more&quot;' expr:title='data:post.title'> Read More</a>

Step 4 And replace the above code by below code


<div>
<div expr:id='&quot;summary&quot; + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSnippet(&quot;summary<data:post.id/>&quot;);</script>
   </div>

Step 5 Now again find </head> and paste the below JavaScript above </head>
 
<b:if cond='data:blog.pageType != &quot;item&quot;'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<script type='text/javascript'>
snippet_count = 200;
//<![CDATA[
function removeHtmlTag(n,e){if(-1!=n.indexOf("<")){for(var t=n.split("<"),i=0;i<t.length;i++)-1!=t[i].indexOf(">")&&(t[i]=t[i].substring(t[i].indexOf(">")+1,t[i].length));n=t.join("")}for(e=e<n.length-1?e:n.length-2;" "!=n.charAt(e-1)&&-1!=n.indexOf(" ",e);)e++;return n=n.substring(0,e-1),n+"..."}function createSnippet(n){var e=document.getElementById(n),t=snippet_count,i='<div class="snippets">'+removeHtmlTag(e.innerHTML,t)+"</div>";e.innerHTML=i}
//]]>
</script>
</b:if>
</b:if>


Customization

  • For increasing the number of character on post summary please change snippet_count = 200; to snippet_count = 300; or lesser number.
Step 6 Now hit the Save template button.

Now check your Blogger template and see extended post summary. For any further support feel free to leave a comment below.
Go Up