You Are Here : Home » , » Hide/Show Widgets/Gadgets in Home/Post/Specific Pages of Blogger

Hide/Show Widgets/Gadgets in Home/Post/Specific Pages of Blogger

Hello! Welcome here. In this post we are going to know how to hide or show widgets/gadgets in Blogger. There are chances that you want a widget to appear only in specific page and you don't want to appear in other pages. But Blogger don't allow easy method of doing that. So, in this post I will make you familiar with hiding or showing widgets of Blogger in the page or page group you want. If you want the widget to appear only in specific post than you will be able to that after reading this post. You will also be able to hide/show widgets in HomePage, Static Page, Archive Pages, Index Pages(HomePage, Post Page, Static Pages). You can control almost everything in a way want it to appear.
Well, there is not an easy method to hide (or show) in widgets in Blogger but you can use Conditional Tags to do this. It is called Conditional Tags because it allows to appear content in specific conditions. Let's proceed to tutorial.
Before going further in this post I will advice you to make a Backup of your Template. To make Backup of your Template Go to Blogger Home > Dashboard > Template. And than click on Backup/Restore Template. Now Download your Blogger Template. Now follow the steps given below to hide ( or show ) widgets ( or gadgets ) in static, post, home, label, archive, index, or particular pages of Blogger.
  • First of all Sign in to your Blogger Account if you haven't signed in yet.
  • Now click on the Blog on which you want hide/show widgets.
  • After that Go to Layout Section. Now copy the title of Widget which you want to hide or show. Let's say you want to hide Recent Posts widget than you will copy this title. See the image below to know what I mean to show.
Hide/Show Widgets/Gadgets in Home/Post/Static/Archive/Specific Pages of Blogger
Copy the Title of Widget/Gadget
  • After getting the title of widget you want to hide (or show) you will go to Template Page. In the Template page click on Edit HTML which is just below the live preview of your Blogger blog. Now search for the title which you copied in the previous step. You can search by pressing CTRL+F. Let's say the Title is Recent Posts than you will search for Recent Posts.
  • After searching Widget Title you will find the code very similar to the one given below.
<b:widget id='HTML2' locked='false' title='Recent Posts' type='HTML'>
            <b:includable id='main'>
  <!-- only display title if it's non-empty -->
  <b:if cond='data:title != &quot;&quot;'>
    <h2 class='title'><data:title/></h2>
  </b:if>
  <div class='widget-content'>
    <data:content/>
  </div>
  <b:include name='quickedit'/>
</b:includable>
          </b:widget>
I have taken the picture of the widget after searching the title of my widget. You can see it below.

Hide/Show Widgets/Gadgets in Home/Post/Static/Archive/Specific Pages of Blogger
See the title in circle
  • After finding the code of your widget follow the steps given below to hide or show widget in your Blogger blog.
  1. If you want the widget or gadget to appear only in specific page than you will need to use that Conditional tag of Blogger. See the code below.
<b:widget id='HTML2' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'><b:if cond='data:blog.url == "PUT_URL_HERE"'> <!-- only display title if it's non-empty -->
<b:if cond='data:title != &quot;&quot;'>
<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>
You will need to replace PUT_URL_HERE URL of the post or page in which you want to show this widget. Don't forget to add </b:if> after "<b:include name='quickedit'/>". Let's understand the use of above conditional tag.

Everything which will be inside the above conditional tag will only appear in the URL you want it to appear. See the tag below.
<b:if cond='data:blog.url == "PUT_URL_HERE"'>Codes which will appear in the URL specified in the conditional tag.
</b:if>
If you want to hide the widget from particular post or page than you can use the conditional tag given below. It will hide that widget from the specified page.
<b:if cond='data:blog.url != "PUT_URL_HERE"'> Codes which will appear in the URL specified in the conditional tag.
</b:if>
The only change I have made in above conditional tag is that I have replaced == (is equal to) with != (not equal to). In the previous section we learn how to show widget in specific page. If you want to hide the a widget from specific page than add the code as shown below.
<b:widget id='HTML2' locked='false' title='Recent Posts' type='HTML'>
<b:includable id='main'><b:if cond='data:blog.url != "PUT_URL_HERE"'> <!-- only display title if it's non-empty -->
<b:if cond='data:title != &quot;&quot;'>
<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>
You can repeat this step to every widget you want hide or show. Now you have learned where to use the conditional tags to hide or show widget. If you want to hide or show widget/gadget in posts, label, or home page than you can learn the proper use of each and every conditional tags here. Almost every use of Blogger Conditional Tags is explained in that posts. You can use those conditional o hide (or show) widgets/gadgets as explained in this post.
That's it! Hope you like this post. If you faced any problem in understanding the above process than feel free to ask us. You can also drop a comment below.

Ads by Google
If you enjoyed reading this article then please leave a comment or subscribe to our newsletter to get all the future posts delivered to your feed reader or you email desk.

No comments:

Leave a Reply

Welcome to SpicyTweaks.

Copyright © 2013-17 SpicyTweaks. All Rights Reserved.

Scroll to top