Sunday, April 24, 2011

How to add read more in blogger in the home page?

Suppose you want to add a read more link in your blogger post's home page. Then you have to modify in the design as follows:

Edit HTML-tab open the edit Html tab inside the layout on your dash board.
First take a back up of that file then search for

<div class="post-body entry-content">
<data:post.body></data:post.body>
<div style="clear: both;">
</div>
</div>


And replace with the following code:

<div class="post-body entry-content">
<b:if cond="data:blog.homepageUrl == data:blog.url"></b:if>
<style type="text/css">
.restofpost {display:none;}
</style>

<data:post.body></data:post.body>
<b:if cond="data:post.link"></b:if>
<a expr:href="data:post.link" href="http://www.blogger.com/post-edit.g?blogID=9164956840491696729&amp;postID=7822811725581667713">Read more...</a>
<b:else></b:else>
<b:if cond="data:post.url"></b:if>
<a expr:href="data:post.url" href="http://www.blogger.com/post-edit.g?blogID=9164956840491696729&amp;postID=7822811725581667713">Read more...</a>

<div style="clear: both;">
</div>
</div>

And then save the code

Now while posting we have to do as follows:

<div class="summary">
Summery is here</div>
<div class="restofpost">
Type rest of post here</div>

No comments:

Post a Comment