Sunday, May 11, 2008

How to add to add "READ MORE" expandable post on Blogger

This guide will allow your blog hosted on Blogger to have an expandable post. Having an expandable post makes your post interesting. This will also give you the opportunity to put on your main page a great number of posts without making it incredibly long and difficult to load.

Here are the easy steps:

1. Go to Layout then Edit HTML
2. Search for the line <p><data:post.body/></p>
3. Paste the code below above <p><data:post.body/></p>


<b:if cond='data:blog.pageType == "item"'>
<style>.fullpost{display:inline;}</style>
<p><data:post.body/></p>
<b:else/>
<style>.fullpost{display:none;}</style>


your code should look like this:


4 . After adding the first set of codes. add the code below under <p><data:post.body/></p>


<b:if cond='data:blog.pageType != "item"'><br />
<a expr:href='data:post.url'>Read more...</a>

</b:if>

</b:if>







your code now should look like this:


5. Save your Template. This will only apply to your new posts. If you want summarize your old posts place <span class="fullpost"> After the lines on your post you want to summarize. Make sure to place </span> after your posts.
6. Go to Settings then Formatting, Look for Post template and paste the code below

<span class="fullpost">

</span>



3 comments:

Amit said...

Hello...........

I tried your trick but could not find that tag in my template.

If you could take a look at my template at:http://techthek.googlepages.com/template.txt and post the trick for my template.

I have surfed the net all over and cant find any resource

regards
amit
http://techthek.blogspot.com

Anonymous said...

check "expand widgets" flag

Anonymous said...

look for this code <div class='post-body'> instead, then try inserting my expandable code again.

if you have trouble editing your blog again feel free to contact me anytime :)