The concept of the code is very simple. The content of the post is placed in a div ,but without the select part of the text. The display of that div is set to hidden, so on the main page of the blog is visible just that part of the post what is not in that div. The full post is visible only on the post page. Here is the code:
<b:if cond='data:blog.pageType == "item"'>I have used full-post as the name of that div. Place the code right after the <data:post.body/> line.
<style>#full-post{display:inline;}</style>
<b:else/>
<style>#full-post{display:none;}</style></b:if>
Save your template and now edit your posts in the following way:
This is the first part of the post , the teaser (the part of text showing up on the main page of the blog) <div id="full-post"> This is the rest of the post. This part of the post is visible only on the page of the post. </div>
NOTE: Don`t forget to close the div tag! If you don`t understand something just ask!
2 comments:
thanks for sharing very informative post...
I have read your article, I think this is very good!I'm in love with this piece!It's so cool~!
Thanks
Post a Comment