counter free hit invisible

Blogger Conditional Tags (Statements To Hide/Display Anything) – 2024

Blogger is the best and free platform for creating blogs. If you are a blogger you may have heard about other professional CMS platforms like WordPress, Joomla, and more but we always have the mindset that bloggers having limited accessibility as compare to other famous CMS platforms but actually it is not so true.

Just like WordPress, we can design a great theme on blogger. But to make your blog attractive you need to learn some important techniques which help for better customization in blogger. For that purpose blogger, conditional tags are too important.

Every blogger wants to make their blog good looking. But the major problem faced by bloggers is when we want to use some gadgets or widgets on specific pages. To Hide or show any widget according to pages, post, homepage, or other specific pages we need blogger conditional tags.

This conditional statement allows you to show and hide any field on different pages. So if you want to hide or display any widget or even full portion then simply choose blogger conditional statements according to your requirement.

Important Conditional Blogger Tags.

Below given tag perform their functioning according to their condition. Just like if you add a homepage conditional tag then it allow that section to display only on the homepage and hide from another.

If the same ways you can show anything whatever you want to display on homepage, posts, pages, search pages, labels, archives, or even only at a single particular path. These tags are very useful in these types of situations.

Also Check:- Responsive Blogger Templates

#1 To Show Widget or Any Portion only at Homepage.

<b:if cond=’data:blog.url == data:blog.homepageUrl’>
 Your Section or Widget portion here
</b:if>

If you want to display anything just like any widget or even whole sidebar, footer, or header section just only at homepage then simply.

#2 To Show Widget or Any Portion only at a particular page.

<b:if cond=’data:blog.url == “URL of the page“‘>
 Your Section or Widget portion here
</b:if>

This conditional tag is used when you want to show anything just only a particular page to use this simply replace the URL of the page this portion with the URL of the post or page.

#3 To Show Widget or Any Portion only at Post and Pages only.

<b:if cond=’data:blog.pageType == “item”‘>
 Your Section or Widget portion here
</b:if>

If you want to display anything only at post and pages and want to hide from the homepage, archive, and other search pages then this conditional tag works for you.

#4 To Show Widget or Any Portion only at Label Pages.

<b:if cond=’data:blog.searchLabel’>
 Your Section or Widget portion here
</b:if>

If you want to display anything only at label pages and want to hide from homepage, post, pages and other pages then use the above label conditional tag.

#5 To Show Widget or Any Portion only at Archive Pages.

<b:if cond=’data:blog.pageType == “archive”‘>
 Your Section or Widget portion here
</b:if>

If you want to display anything only at archive pages and want to hide from homepage, post, pages and other pages then use the above archive conditional tag.

#6 To Show Widget or Any Portion only at Static pages.

<b:if cond=’data:blog.pageType != “static_page”‘>
 Your Section or Widget portion here
</b:if>

The above conditional tag makes your widget or any portion working for static pages and hide from all other nonstatic pages of your blog.

#7 To Show Widget or Any Portion only at Post and Static pages.

<b:if cond=’data:blog.url == data:post.url’>
 Your Section or Widget portion here
</b:if>

The above conditional tag makes your widget or any portion working for post pages and static pages only and hide from all other pages except post and static pages of your blog.

How To Use Blogger Conditional Tags?

<b:if cond = ‘Your Condition here‘>
Your Section or Widget portion here
</b:if>

Above given are few conditional tags which i find useful otherwise there are several conditional tags available if have a little bit of knowledge in programming then it will easy to understand this. All the condition will come just in the place for Your Condition here and paste the below codes.
Suppose you want to use these condition for any section so put that section like

<b:if cond = ‘Your Condition here‘>
<div class=”name”>
</div>
OR

<b:widget id=”name” locked=”false” title=”name” type=”HTML”>
</b:widget>
</b:if>

Above given piece of codes just a format don’t use these codes in same way. Simply add blogger conditional tags given above according to their type

Other Blogger Conditional Tags Statements.

1. data:blog.pageType == “index” (For collective content pages like home, archive, label)
2. data:blog.searchQuery (For Search query pages where result displays)
3. data:post.isFirstPost (For First post only)
4. data:blog.pageType == “error_page” (For error pages with response code 404)
5. <b:else /> (For Multi-level conditional Tags)

These are a few other blogger condition tags which you can also use in the same way.

Reverse Blogger Condition.

<b:if cond=’data:blog.url == data:post.url’>
</b:if>

In case you want to reverse your condition then you can replace  == with  != 
==  is for when the statement is equal to the condition to make a comparison 
!=  is for when the statement is not equal to the condition to make a comparison. 

 Need Help Regarding This Topic?

In conclusion, we hope all your doubts related to blogger conditional tags and their usage must be cleared. Please share your ideas or even if you face any problem while implementation of above codes. We will always be here to help you.

800,051FansLike
1,376FollowersFollow
336FollowersFollow
10,000SubscribersSubscribe