delete post from home page

荒凉一梦 提交于 2019-12-11 19:04:48

问题


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 == &quot;static_page&quot;'>
          <b:include data='post' name='comment_picker'/>
        </b:if>
        <b:if cond='data:blog.pageType == &quot;item&quot;'>
          <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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!