问题
I am following up on this post:
How to hide all post's having certain labels on home page in Google Blogger?.
I test out the suggested solution to my post. I want to remove "tips" from the home page. "Tips" doesn't have any image.
So, I deleted all the suggested codes:
<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.
回答1:
You have to replace the line <b:include data='post' name='post' />
not <b:include data='post' name='comment_picker'/>
Also, "tips" != "Tips"
来源:https://stackoverflow.com/questions/57120391/delete-post-from-home-page