title: How to check if a Blogger Post has specific Label when the Label is HIDDEN?
body: <p>All my Blogger posts have <strong>Labels</strong>, but I choose not to show them on my Blogger Site. On my <strong>Blogger Dashboard -> Posts</strong>, I still can see all my labels for each post and filter them by label, which is what I want. But when I try to check if the current post has a specific label (which it does have), the following code doesn't work (right before <code>&lt;/body&gt;</code>):</p>
  
  <pre><code>&lt;b:section id="testSection" name="Test Section"&gt;
  
          &lt;b:if cond='data:posts any (p =&gt; p.labels any (l =&gt; l.name == "Label1"))'&gt;
            &lt;script type="text/javascript"&gt;
                console.log("Label1");
            &lt;/script&gt;
            &lt;link href='post-style-for-label1.css' rel='stylesheet' type='text/css'/&gt;
          &lt;/b:if&gt;
  
      &lt;/b:section&gt;
  </code></pre>
  
  <p>I read the <a href="https://stackoverflow.com/questions/42178327/how-to-check-if-a-post-has-a-specific-label-using-conditional-tags">answer here</a>, saying that we can't check <code>data:post.labels</code> <strong>outside Blog widget</strong>, but when I placed it inside a widget, it says widget cannot contain <code>&lt;b:if&gt;</code> -- this is why I placed it under <code>&lt;b:section&gt;</code>. But at the end, I still can't make my code to detect <strong>Label1</strong>. I tried the following code but not working too:</p>
  
  <pre><code>&lt;b:if cond='data:post.labels any (label =&gt; label.name == "Label1")'&gt;
      &lt;script type="text/javascript"&gt;
          console.log("Label1");
      &lt;/script&gt;
      &lt;link href='post-style-for-label1.css' rel='stylesheet' type='text/css'/&gt;
  &lt;/b:if&gt;
  </code></pre>
  
  <p>If I can remember correctly, I have removed the code that displays the labels, but is it necessary to display the labels on the site in order for the code to work? I doubt that because Blogger does have all my labels for every post. How can I make my code to work? Thanks in advance.</p>