/

How to display the title of the post with no content (page) posts

When performing a search or bare labels (kategory) on my blog will definitely see results in the form of a link display the post title and date without displaying the contents of this post entirely, of course, in this way is very advantageous and facilitates visiting when surfing on our blog, try to imagine when kategory visitors opened the label or whose contents have 100 posts, of course this becomes a problem later on and take a long time to truly open the page perfectly.

To solve the above problem it is better we show only the post title and the date of posting, in addition to simplicity, of course we will be loading the page 50x faster than normal when opening the page labels.

See examples of images that show only the post title and date:

Want to know how to make it follow the steps below:

First:

Go to Template -> Edit HTML -> Do not forget to do backup template:) -> then check the 'Expand Widget Templates'

Second:

See 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'/>

Then find the red color code above, if you have found replace the red color code above the 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>

Third:

Do not forget to save and see the results.




Related Post



RSS Feed

0 Comments for How to display the title of the post with no content (page) posts

Leave a comment!

design by tikimedia © 2010 | Converted to Blogger by Blogger Templates | I Powered by Blogger