htmlbloggerblogger-dynamic-views

Conditional Blogger,


How do I make this CSS appear in every blog tag, but I don't want it to appear in specific tags

This code does the opposite, it specifies which tag should appear in the css, I would like a code that could show the css everywhere except in certain tags

  <b:if cond='data:blog.searchLabel in [&quot;car&quot;, &quot;Identity&quot;, &quot;Brand&quot;]'>

<style>
    body { background: #e2ad44 }
  </style> 

</b:if>

Solution

  • Use the logical operator not to reverse condition:

    <b:if cond='data:blog.searchLabel not in ["car", "Identity", "Brand"]'>
      <style>
        body { background: #e2ad44 }
      </style> 
    </b:if>