Sometimes, we tend to publish 3 or more posts daily. In effect, due to very long entries, the other post will likely be invisible to the readers. At some instances, the blog owner is forced to create navigational links on the sidebars or even near the header just to expose other articles. Certainly, this requires effort on the part of the blogger.
As a matter of fact, this has been my case. Although I like the idea of exposing my other post both on the sidebar and header, still, I want to have a newspaper like blog wherein the top stories are highly visible. This is the reason why I decided to search the net on how to have expandable post.
Luckily, I found many articles through the search engine but I’ve chosen this simple tutorial from It’s A Fun. And now, you can even attest through my blog if this tutorial has been effective. Absolutely, the tutorial has served it’s purpose.
Below is the complete steps to “Make an Expandable Post in Blogger (Blogspot)”
Pre Requisite: Make sure you have enabled post pages.
1. Go to your blogger setting panel >> Template >> Edit HTML
2. Back-up your template first by clicking “Download Full Template” link (this is a best practice).
3. Check on “Expand Widget Templates”
4. Search for </head> & replace it with following javascript code:
<script type=’text/javascript’>
function truncate_body (postid) {
var id = document.getElementById(postid);
var postbody = id.innerHTML;
var len = postbody.toLowerCase().indexOf(”<br”);if(len>0)
postbody = postbody.substring(0, len);
id.innerHTML = “<p>” + postbody + “</p>”;
id.style.display=”block”;
}
</script>
</head>
5. Search for <p><data:post.body/></p> & replace it with following code:
<b:if cond=’data:blog.pageType != “item”‘>
<div expr:id=’”postid_” + data:post.id’>
<data:post.body/>
</div>
<script type=’text/javascript’> truncate_body(”postid_<data:post.id/>”); </script>
<p>
<a class=’read_more’ expr:href=’data:post.url’><b>Read More…</b></a>
</p>
<b:else/>
<p><data:post.body/></p>
</b:if>
Yes, that’s all. If you have any problem implementing this solution feel free to leave a comment and I’ll get back to you. If you think this will be helpful to our fellow bloggers just link them to this site.



Grabe Joliber! Champion ka! Salamat ng marami! Did it to my blogger accounts na. Very helpful! This is actually the first time I tried tweaking my template without messing up. Thanks to you!
Thanks Jen.. Nice to hear that you were able to implement it successfully..
Nga pla, Joliber, wala tlaga itong option na ako mismo magse-set where the post will be cut?
I’ll try to research that.. That code only cuts from the first paragraph.. So if it happens that your paragraph is one sentence, then it will cut from there..
Joliber, this is good. I found out the code to this this a few weeks back too, and I love it. good tip!
yeah, i love it too..
WOW! Congrats Joliber for a job well done! I know u have been trying real hard to find out about this feature and finally, successful! I will try to do this too in my page, will let you know when im done.
P.S. How’s basketball last night? Hope you turned out the champions!
I hope you can successfully implement it..
Wow! Salamat sa info mo about this one. Matagal ko ng gusto ito di ko lang alam gawin but now I’ve done it!
Salamat Joliber!
I’m so happy that you have implemented it successfully..
WAAAAAAAAAAAAAAAAAAAAAHHHHHHHH. Buong akala ko hindi pwedeng gawin yan sa Blogger, pwede pala! Yay! Salamat Kuya - ang helpful!
Hi Earvin, hope you can implement it successfully, just contact me if you have any problem concerning the codes..
Too bad it’s not successful in mine, sigh!
I’ll get back to you ate ellaine..
i tried the hackosphere version for my blogspot but to no avail. will try again using this one.
it’s easy with the wordpress i’m currently using.
Just let me know if you have made it successfully..
[…] Must read for blogspot (blogger.com) friends.How to Make an Expandable Post in Blogger (Blogspot)?Blogger.com Malware Attacks | Move or Be Deleted in the Blogosphere Social […]
HALA. Hindi ko makita yung code sa second step! Help!
Earvin’s last blog post..KG in Lucban: The Super Holy Week Gig!
Hi Earvin, hindi code yung second step, link lang siya sa upper part ng “Edit Template” na page.. add mo ako sa ym: joliber_kid@yahoo.com if you still have problems..
Waaah. Iba ata. Kuya di ko talaga ma-gets yung Step 2 kasi di ko makita ang link na dapat i-replace.
Earvin’s last blog post..A Darker Carrot Prince.
Hi Earvin don’t be confused.. Step 2 requires no coding at all.. The only purpose of that step is two back-up your template, but if you are sure you can manage the changes w/o backing up, then proceed to step 3..
But then again, I recommend to go through step 2.. If you have any problem don’t hesitate to pm me at ym, joliber_kid@yahoo.com..