Saturday, August 22, 2009

How To Add Read more to blogposts ;


Lately many people have been asking me regarding how to use expandable posts, which I personally think makes the blog look decorous & elegant. As you can see in my blog I have used expandable posts to make my blog more user friendly and easy to navigate, you can add this option by following these steps



For blogger, use the following steps to add read more option:

- Go to Layout through the blogger Dashboard.


- Now open Edit Html option.

- Tick the Expand Widgets option and find <data:post.body/> using Ctrl+F.

- Now paste the code given below above the <data:post.body/> line:

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


- Now paste this another code given below after the <data:post.body/> line:

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


(Note: There are supposed to be two tags)

After saving the template, go to Settings -> Formatting and enter the following code in post template code:

<span class="fullpost">
</span>


It will appear as follows:



Now in by default every post will contain the above code as shown in the picture below:



After saving settings you can start posting. The text that you want to be shown after the read more option should be entered between the two lines as shown in red colour below in posting section:

<span class="fullpost">
ENTER THE TEXT YOU WANT TO BE SHOWN AFTER READ MORE OPTION
</span>

0 comments:

Post a Comment

 

Blogging Guide. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com