U sing blogger is not as handy as WordPress. Though some users might argue with me, but it took a long time for me to setup my silly blog wi...

Using blogger is not as handy as WordPress. Though some users might argue with me, but it took a long time for me to setup my silly blog with blogger. While I have done quite easily and within a very short time via WordPress. Stay tuned, I am going to show my WordPress soon. But not now, today we are going to talk about one of the major blogger problem. Blogspot doesn't give user to customise each and every single post/page/archive on their own. Once you activate any widget, in your blog, it will be displayed in all the pages by default, including your homepage.But what if you want a certain widget to appear only on a certain page or pages, can it be done? Well, there is a hack to do it. Today we're going to show you how. If you have played with blogger for quite a few time, then you might already try to make an specific post/page unique (for example, you might want to design your about me page in a different way). So what to do? You can enable or disable some part, gadget in a specific post/page. Previously I have shared about how to add related post widget to blogger. In that trick, I have made that related post widget visible to only blogger posts. You might want to show it in all pages including home page, archive page. Or you might want to hide your sidebar, a specific widget on a static page. So let's learn how to do this.

Pre-Procedure

Go to Blogger’s Dashboard > Design > Edit HTML. Make sure to Backup Your Template before doing any change. Otherwise you can make it messy.

Now tick on “Expand Widget Templates”.

Getting started

We will use a simple HTML tag <b:if cond= > </b:if>to hide/view any part of your site. We will place the part we are playing with between this tag. We'll also use some blogger tweak here. So let's learn about them first.

Finding the Widget

Go to Dashboard > Design > Edit HTML. Check the Expand Widget Templates check box on top right of the HTML window. Find your widget in the HTML by using Ctrl+F and entering the widget Id in the search box. Like if you want to hide a Widget called “E-mail Subscription” , then you can search for E-mail Subscription. After searching you'll find a group of code like below.

Now look closely on the red marked tag. Make sure that the <b:if> opening will go just below the opening of <b:includable> tag and it will end with </b:if> just before </b:includable>. Here this widget will show on homepage only. You can replace the data:blog.url == data:blog.homepageUrl value with any tag you want from the second step.

To Hide The Widget

If you have understand about how to show an widget in a specific place, then you can do the next step (how to hide an widget) easily. All that you need to do is to replace first = sign from data:blog.url == with an ! Sign. Quite easy, huh? So we just need to change a single sign from the previous code. Let's check out to hide the previous widget from homepage.

How To Hide An Element Using CSS

You can hide/show a widget with the previous trick. But what will you do when you need to hide a major page element like sidebar, footer? Well we'll use CSS to do this. The conditional <b:if> tag will remain same like previous – so you're not going to tell it again. Press Ctrl+F in Edit HTML tab and search for </head>. We'll place the CSS just before it. You have two find the CSS class/ID name for the page element you are going to show or hide. Like, on my site – if I'm going to hide sidebar than I have found that with .sidebar class name. So to hide sidebar from homepage, I need to paste the simple code above </head>