youtube SEO, tricks for blogger, wordpress tricks for earning money online youtube earning, whatsapp,windows, android & all about new technology.

Blogger Conditional tags for show hide widgets

No comments

Use Blogger condition if else tag for show or hide widgets in your selected pages like post Archive Page or particular selected URL what this condition tag mean it mean b if condition this tag we use many time in our blogger template you can manage your blog as you want you can choose which widget in which page need to show this tag is very useful adjust widget according to device you can show special widget in mobile page below we have many conditional tags.

How to show Widgets only on Homepage

<b:if cond='data:blog.url == data:blog.homepageUrl'>
Put Widget code here
</b:if>


How to Hide Widgets onliy in Homepage

<b:if cond='data:blog.url != data:blog.homepageUrl'>
Put Widget code here
</b:if>


How to Show Widgets only in Index

<b:if cond='data:blog.pageType == "index"'>
Put Widget code here
</b:if>


How to Hide Widgets only in Index

<b:if cond='data:blog.pageType != "index"'>
WIDGET CODE GOES HERE
</b:if>


How to Show Widgets only in Static Page

<b:if cond='data:blog.pageType == "static_page"'>
Put Widget code here
</b:if>


How to HIde Widgets only in Static Page

<b:if cond='data:blog.pageType != "static_page"'>
WIDGET CODE GOES HERE
</b:if>


How to show widgets only in Post Page

<b:if cond='data:blog.pageType == "item"'>
Put Widget code here
</b:if>


How to Hide widgets only in Post Page

<b:if cond='data:blog.pageType != "item"'>
Put Widget code here
</b:if>


How to Show Gadgets only in Specific Page/Url

<b:if cond='data:blog.url == "URL OF Selected Post"'>
Put Widget code here
</b:if>


How to Hide widgets only in Specific Page/Url

<b:if cond='data:blog.url != "URL OF Selected Post"'>
WIDGET CODE GOES HERE
</b:if>


How to show widgets only Post and Static Pages

<b:if cond='data:blog.url == data:post.url'>
Put Widget code here
</b:if>


Show widgets in Label Search

<b:if cond='data:blog.searchLabel'>
Put Widget code here
</b:if>


How to show in Archive Page

<b:if cond='data:blog.pageType == "archive"'>
Put Widget code here
</b:if>


How Show to widget only in First Post

<b:if cond='data:post.isFirstPost'>
Put Widget code here
</b:if>


Conditional Tag for Error page

<b:if cond='data:blog.pageType == "ERROR_PAGE"'>
Put Widget code here
</b:if>


Show widget Mobile

<b:if cond='data:blog.pageType == "data:blog.isMobile"'>
Put Widget code here
</b:if>


Hide widget in mobile

<b:if cond='data:blog.pageType != "data:blog.isMobile"'>
Put Widget code here
</b:if>


Apply two condition use <b:else/> tag


<b:if cond='data:blog.url == data:blog.homepageUrl'>
If condition is true.
<b:else/>
If condition is false.
</b:if>

How to apply this codes in already showing widgets

Go to html Edit option find widget by title name as I'm searching sponsor widget see below demo image and apply any above given condition as i'm using in below image.
show hide blogger widgets