Search code examples
xmllabelbloggerblogs

delete post from home page


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. 

Solution

  • You have to replace the line <b:include data='post' name='post' /> not <b:include data='post' name='comment_picker'/>

    Also, "tips" != "Tips"