We can do logical OR operation using or (keyword) or || (double pipes) in the condition for cond attribute of the b tag, specifically the b:if.
For example, we want to show custom content or executing script only on static page OR item (post):
OR:
We can put more than two conditions for the OR.
OR:
OR, WE MIX THEM 😂
That actually works! But it will confuse ourselves. Thus, it is recommended to consistently use either one, the || (double pipes) or the or keyword.
Logical AND
In latest Blogger XML, we can actually use the keyword and for AND operation. This is a post about that.
For more reference regarding b:if, b:elseif, and b:else, this is a post about Blogger Conditional Tag — b:if and b:else.


Comments
Post a Comment