How to create blogger post summary without thumbnail image

Table of Contents
Blogger default built in Post in full article in homepage without simple and making other post push down not seeing other post in first view this happen when blogger in view web (desktop version)without automatic summary post snippet.
How to create blogger post summary without thumbnail image
Mobile version on homepage made by <data:post.snippet> and make summary post easy to see of all posts.
How to make homepage simple post and make sumarry post in desktop view in blogger this code js for summary post :
Open template editor and Put below code on blogger post template in head tage between <head> js code</head>

<script type=’text/javascript’>
snippet_count = 180;
//<![CDATA[
function removeHtmlTag(strx,chop){
if(strx.indexOf(“<“)!=-1)
{
var snippet = strx.split(“<“);
for(var i=0;i<snippet.length;i++){
if(snippet[i].indexOf(“>”)!=-1){
snippet[i] = snippet[i].substring(snippet[i].indexOf(“>”)+1,snippet[i].length);
}
}
strx = snippet.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 createSnippet(pID){
var div = document.getElementById(pID);
var summ = snippet_count;
var summary = ‘<div class=”snippets”>’ + removeHtmlTag(div.innerHTML,summ) + ‘</div>’;
div.innerHTML = summary;
}
//]]>
</script>

And changing second <data:post.body> with below code js blogger :

<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>
And Save your blogger template editor. To change Summary snippet character in snippet_count and change with 200 or what you like. Thanks. 

Post a Comment