Blogger main page filter posts on labels -
i need filtering out posts based on labels (displaying posts label) on main page of blogger on custom template has follow code:
<b:loop values='data:posts' var='post'> <b:if cond='data:post.isdatestart'> <b:if cond='data:post.isfirstpost == "false"'> </div></div> </b:if> </b:if> <b:if cond='data:post.isdatestart'> <div class="date-outer"> </b:if> <b:if cond='data:post.isdatestart'> <div class="date-posts"> </b:if> <div class='post-outer'> <b:include data='post' name='post'/> <b:if cond='data:blog.pagetype == "static_page"'> <b:include data='post' name='fn_comment_picker'/> </b:if> <b:if cond='data:blog.pagetype == "item"'> <b:include data='post' name='fn_comment_picker'/> </b:if> </div> </b:loop>
replace
<b:include data='post' name='post'/>
with
<b:if cond='data:post.labels'> <b:loop values='data:post.labels' var='label'> <b:if cond='data:label.name == "your label"'> <b:include data='post' name='post'/> </b:if> </b:loop> </b:if>
Comments
Post a Comment