Friday, August 7, 2009

How to Show Post Title Without Full Content for Label

When performing a search or a content label (category) on our blog. it’s always display full content for example if we choose label “tutorial” it will be display all post on tutorial label with full content. How if the post in tutorial has 100 post? It will be difficult for us and for our reader to wait our blog loading to display it.

So we will make it short, from Full content display to short display with only display the title and posting date. Of course, loading page will be faster 50x than normal when opening page label.

Let’s move on, simply follow this Steps:

1. Open Template, Backup your Template and click on Expand Templates widget.

2. Then See the code below :

<!-- posts -->
<div class='blog-posts hfeed'>
<b:include data='top' name='status-message'/>
<data:adStart/>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.dateHeader'>
<h2 class='date-header'><data:post.dateHeader/></h2>

</b:if><b:include data='post' name='post'/>

3. Then look for code red above, change the code red with this code below

<b:if cond='data:blog.homepageUrl != data:blog.url'> <b:if cond='data:blog.pageType != "item"'> <a expr:href='data:post.url'> <data:post.title/></a><br/><br/> <b:else/> <b:include data='post' name='post'/> </b:if> <b:else/>

<b:include data='post' name='post'/> </b:if>


4. Finally save your setting.

Congratulate, now your blog will only display post tile and post date with your full content when reader click on label/category.

No comments:

Post a Comment