There are many of the blogger users these days who are using free blogger templates and in most of these free templates there is a problem of short post snippets(description) on homepage, today I'll show you how you can increase size of your post snippets easily. so lets begin.
Increasing Size Of Post Snippet
#1: Go to Blogger >> Theme >> Edit HTML#2: Press CTRL + F and search for </head>
#3: Now copy the following script before </head> tag
<script type='text/javascript'>
snippet_count = 200;
//<![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>
<div expr:id='"summary" + data:post.id'>
<data:post.body/></div>
<script type='text/javascript'>createSnippet("summary<data:post.id/>");</script>
EmoticonEmoticon