Hiding posts with a certain markup from the blogger home page

0

I have some posts that are just javascript, and on the home page it appears the javascript, I would like to hide posts that contain the "Hide" page, what to do? .

I tried to change this: <b:include data='post' name='post'/> Pos it:

<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 != "LabelYouWantToHide"'>
                <b:include data='post' name='post' />
            </b:if>
        </b:if>
    </b:loop>
<b:else/>
    <b:include data='post' name='post' />
</b:if>


I've also tried the content page.

    <b:with var='posts'
            value='data:posts filter
                   (p => p.labels none
                         (l => l.name == "hide-me"))'>
    </b:with>

But that hides the post even on the page of the post itself.

    
asked by anonymous 29.06.2018 / 04:31

1 answer

0

Find: <b:include data='post' name='post'/> and switch to:

<b:if cond='data:blog.url == data:blog.homepageUrl'>
  <b:if cond='data:post.labels none ( l => l.name == "Esconder" )'>
    <b:include data='post' name='post'/>
  </b:if>
  <b:else/>
  <b:include data='post' name='post'/>
</b:if>
    
29.06.2018 / 16:00