我需要一些帮助,根据标签过滤帖子(仅显示带有特定标签的帖子)在Blogger主页上的自定义模板上,该模板包含以下代码:
<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>
答案 0 :(得分:0)
替换
<b:include data='post' name='post'/>
与
<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>