To apply this method, edit your blogger sites XML template (be sure to back it up first!), and click "Expand Widget Templates". Now look for the line:
Replace them and everything between them with the following code:
And find the matching </b:loop> tag.<b:loop values='data:posts' var='post'>
Replace them and everything between them with the following code:
Now look for the last </b:includable> tag you can find, and paste this code directly after it:<b:loop values='data:posts' var='post'><b:if cond='data:blog.url == data:blog.homepageUrl'><b:if cond='data:post.labels'><b:loop values='data:post.labels' var='label'><b:if cond='data:label.isLast == "true"'><b:if cond='data:label.name != "Label_To_Filter"><b:include data='post' name='printPosts'/></b:if></b:if></b:loop></b:if><b:else/><b:include data='post' name='printPosts'/></b:if></b:loop>
Note that this code has a few bugs:<b:includable id='printPosts' var='post'><b:if cond='data:post.dateHeader'><h2 class='date-header'><data:post.dateHeader/></h2></b:if><b:include data='post' name='post'/><b:if cond='data:blog.pageType == "item"'><b:include data='post' name='comments'/></b:if></b:includable>
- Posts with no label will not be displayed on the main page.
- The filtered label must be the last label of a filtered post.
- If all your recent stories belong to the filtered category, your blog may appear empty.
0 Komentar