To Display/Show/Hide Gadgets/Widgets for Home pages/Static pages/Post pages in Blogger/Blogspot.

Some times we needs to display or show widgets or gadgets only on home page of blogger or need to display gadgets only on post pages of blogger or need to display gadget in archive pages of blogger. But why we need it to display widget in some specific pages? Suppose you created a featured content gadget and most of blogger display feature content to the top side of blog posts in the home page of blogger and if some body click on any posts then they entered in the post page and they could see the full post and there do not alive featured content gadget on to that post page. So it is a good idea for to display your feature content only on home pages of your blogger. So feature content is a case but you can do these for any of your widgets. Let's what will you cover in this post.

1. How to display gadgets only on home page of blogger. ( How to hide gadgets from static pages and post pages in blogger. )


2. How to display gadgets only on post pages of blogger.( How to hide gadgets from home page and static pages in blogger. )


3. How to display gadgets only on static pages of blogger. ( How to hide gadgets from home page and post pages in blogger. )


4. How to display gadgets on post pages and static pages of blogger.( How to hide gadgets from home pages in blogger. )


5. How to display gadgets on home page and static pages of blogger. ( How to hide gadgets from post pages in blogger. )


6. How to display gadgets in home page and posts pages of blogger. ( How to hide gadgets from static pages in blogger. )


7. How to display gadgets only on archive pages of blogger.


8. How to display gadgets only on a specific page of blogger.


9. How to display gadgets except one specific pages of blogger.


Firstly go to your Blogger dashboard --> Design --> Edit HTML (  Expand Widget Templates )  and now you have to find html codes corresponding to your gadget which want you hide or display. So find the code (using ctrl+F) <b:widget id='HTML but this code is common for your every gadgets so how will you distinguish amoung all gadgets? Let's find how? The whole line associated with the above code will be as follow,

<b:widget id='HTMLx' locked='true' title='Your Title' type='HTML'>

where x can be any integer and for every gadget the value of x will be different and you can see title for every gadgets html code as above code Your Title so basically title is your gadgets name which had you set by creating your gadget so if you don't choose any name in the gadget then it will be blank as title=''  . so now choose which gadget you want to display or hide in any specific pagejust give a title to that gadget and then find the code <b:widget id='HTML which will be corresponding to your title ( taken a name to gadget is only for finding the proper gadget html code purpose only so after hide your gadget you can delete your title name easily as you does). Now you can easily find your gadget html code which will be like as follows,

<b:widget id='HTML19' locked='false' title='Temporary name' 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>

Now you have to add some portion into the above code as I am adding by blue text area in the following code,

<b:widget id='HTML19' locked='false' title='Temporary name' type='HTML'>
<b:includable id='main'>
MY FIRST LINE CODE
<!-- 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>

Now you have to just replace MY FIRST LINE CODE , which matters that where you want to show or hide that gadget, with the codes which will I give you in the following table ( Since we have many cases, as 9 so I have to construct a table )

CasesWant \ DoReplace MY FIRST LINE CODE with
1How to display gadgets only on home page of blogger. ( How to hide gadgets from static pages and post pages in blogger. )<b:if cond='data:blog.pageType == &quot;index&quot;'>
2How to display gadgets only on post pages of blogger.( How to hide gadgets from home page and static pages in blogger. )<b:if cond='data:blog.pageType == &quot;item&quot;'>
3How to display gadgets only on static pages of blogger. ( How to hide gadgets from home page and post pages in blogger. )<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
4How to display gadgets on post pages and static pages of blogger.( How to hide gadgets from home pages in blogger. )<b:if cond='data:blog.pageType != &quot;index&quot;'>
5How to display gadgets on home page and static pages of blogger. ( How to hide gadgets from post pages in blogger. )<b:if cond='data:blog.pageType != &quot;item&quot;'>
6How to display gadgets in home page and posts pages of blogger. ( How to hide gadgets from static pages in blogger. )<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
7How to display gadgets only on archive pages of blogger.<b:if cond='data:blog.pageType == &quot;archive&quot;'>
8How to display gadgets only on a specific page of blogger.<b:if cond='data:blog.url == &quot;Your_URL_Here&quot;'>
9How to display gadgets except any one specific page of blogger.<b:if cond='data:blog.url != &quot;Your_URL_Here&quot;'>

In the 8th case put your pafe url instead of Your_URL_Here,at which you want to display gadget and in the 9th case you have to put your page url at which you don't display gadget.

You done !