我正在关注该帖子:
How to hide all post's having certain labels on home page in Google Blogger?。
我测试了我帖子的建议解决方案。我想从主页中删除“提示”。 “提示”没有任何图像。
因此,我删除了所有建议的代码:
<b:if cond='data:blog.pageType == "static_page"'>
<b:include data='post' name='comment_picker'/>
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<b:include data='post' name='comment_picker'/>
</b:if>
and replace them with the recommended solution:
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast == "true"'>
<b:if cond='data:label.name != "tips"'>
<b:include data='post' name='post' />
</b:if>
</b:if>
</b:loop>
<b:else/>
<b:include data='post' name='post' />
</b:if>
After the update, all my posts disappear from the homepage.
How can remove label "tips" from not appearing on the homepage.
答案 0 :(得分:0)
您必须替换行$py comp.py
True
[['Value1', 'Value2']]
[[], ['Value1', 'Value3']]
[[], [], ['Value1', 'Value4']]
[[], [], [], ['Value1', 'Value5']]
[[], [], [], [], ['Value1', 'Value6']]
[[], [], [], [], [], ['Value2', 'Value1']]
[[], [], [], [], [], [], ['Value2', 'Value3']]
[[], [], [], [], [], [], [], ['Value2', 'Value4']]
[[], [], [], [], [], [], [], [], ['Value2', 'Value5']]
//etc
Output Result: [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]
而不是<b:include data='post' name='post' />
此外,“小费”!=“提示”