How To Hide Widget On Certain Or Specific Pages In Blogger

Share on:

In today’s post, we will learn how we can show or hide widgets in a specific page in Blogger, for this we will need Blogger conditional theme tags.

How To Hide Widget On Certain Or Specific Pages In Blogger

What are Blogger Conditional Themes tags?

Conditional tags are those tags for Blogger Themes, with the help of which we can use any specific URL of our blog or

Then apply any code on the page. There are several types of conditional theme tags.

How to find the ID of Blogger Widgets

First of all, you have to find the ID of any widget you want to show / hide in a page.

For this follow the steps mentioned below

1. First of all go to the dashboard of Blogger and go to the layout section.

Also Read:  Recommended Post Slide Out Widget For Blogger/Blogspot

Dashboard >> Layout

2. In the layout, click on the widget in which you want to apply this trick.

3. With this you can edit that widget, if you have to do any editing then you can do it otherwise you can see the widgetId in the url to find the id of the widget.

How To Use Blogger Theme Conditional Tags

Copy The Red Colour Codes And Use To Your Particular Widgets You Want To Perform Action.
Don’t Forget To Add Ending Tag Of Blogger Conditional Tags In Blog Theme.

How to show / hide blogger widgets in specific page

Blogger Widgets Looks Like Below Code In Blogger Theme.

We Have To Edit This Codes To Perform Our Desire Action.

<b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>

<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:includable>
style="background-color: white;, sans-serif;font-size: 14px" /></b:widget>

Code to Show blogger widget only in homepage

<b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'><!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if></b:includable>
</b:widget>

Code to Show blogger widget only in post / page

<b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == &quot;item &quote;'><!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if></b:includable>
</b:widget>

Code to show widget in a specific page

<b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == "URL of the page"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if></b:includable>
</b:widget>

Code to show widget in archive page only

<b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "archive"'><!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if></b:includable>
</b:widget>

Code to hide blogger widget only in homepage

<b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url != data:blog.homepageUrl'><!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if></b:includable>
</b:widget>

Code to hide widget in a specific page

<b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url != "URL of the page"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if></b:includable>
</b:widget>

Code to hide widget in 404 not found

<b:widget id='HTML1' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType != &quot;error_page&quote;'><!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:if></b:includable>
</b:widget>
Wrapping up :
I Hope After Reading This Post You Are Able To Hide/Show Your Widgets On Your Selected Pages In Blogger.
Getting Any Issues.
Comment Below Comment Box 👇
I Will Help You.
Keep in Touch 🙏🙏

Leave a Comment