How to display the title of the post without content (page) posts
When doing a search or open the contents of the label (Category) in the blog I will definitely see results in the form of a link display the post title and the date of posting without displaying the content at all, of course this way is very advantageous and facilitates visiting when surfing on our blog, try to imagine when visitors opened the label or the contents there Kategory 100 posts, this would be a problem later on and take a long time until the page completely loads perfectly.
To overcome the above problems is useful to display only the post title and the date of posting, in addition to simplicity, of course we will be loading page 50x faster than normal when opening the page label.
See examples of image displays only the post title and date:
want to know how to do this follow the steps below:
First:
Open Template -> Edit HTML -> Do not forget to do backup template:) -> then put a check on the 'Expand Widget Templates'
Second:
See kode below:
<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></data:post.dateheader></h2>
</b:if>
<b:include data="post" name="post">
Then look for the red color code above, if you've met the red color change above code with the code below:
<b:if cond="data:blog.homepageUrl != data:blog.url">
<b:if cond="data:blog.pageType != "item"">
<a href="data:post.url">
<data:post.title></data:post.title></a>
<b:else>
<b:include data="post" name="post">
</b:include>
<b:else>
<b:include data="post" name="post">
</b:include>
Third:
Do not forget to save and see the results. good luck :)
</b:else></b:else></b:if></b:if></b:include></b:loop></data:adstart></b:include></div>
Monday, September 7, 2009
How to display the title of "posting" without content (page) posting
Subscribe to:
Post Comments (Atom)
0 komentar:
Post a Comment