Many bloggers upon putting widgets or gadgets in our sidebar, in header area and footer have noticed that it will appear in all our pages by default, consequently. And it is very important as blogger to hide that widgets/gadgets in our Contact Page or Privacy Policy Pages especially if we are applying for Adsense or if we have already an Adsense Account (see Adsense Program Policies here) . Therefore, it is very important to know how to display or hide elements inside your blog pages.
Note. Be sure that the gadgets or widgets that you have add in blogger layout have a name that is different from other widget name so that you will find it easier to locate what certain widget that you want to hide or show in a certain page.
Step 1. Go to Blogger Dashboard >> Click Template,
Step 2. Hit Edit HTML then click Jump to Widget, then select the widget that you want a certain page to hide or show or you can simply click Control F and enter the widget's name in the search box,
<b:widget id='HTML5' locked='false' title='Feedjit' type='HTML'>
<b:includable id='main'>
Closing tags:
</b:includable>
</b:widget>
Step 4. The following are tags/codes that you are going to put below the opening tags in order to:
1. Show Blogger widget only in home page,
5. Show only widget in a static pages
1. Always put </b:if> above the closing tags so that code will parse correctly.
2. For conditioned number three (3) and four (4) above, replace the red bolded texts with the URL of the page.
3. But for conditioned number one (1), two (2), five (5), six (6), seven (7), eight (8), and nine (9) just simply copy the code and paste it directly to the specific widget (no more editing)
4. You can use our HTML parser to parse your code correctly.
Step 5. Click Preview and if things go correctly, hit Save Template and you are done.
Have a nice day pal and enjoy!
How to Hide or Show Widgets in a Certain Page in Blogger
Step 1. Go to Blogger Dashboard >> Click Template,
Step 2. Hit Edit HTML then click Jump to Widget, then select the widget that you want a certain page to hide or show or you can simply click Control F and enter the widget's name in the search box,
Step 3. Click the black arrow beside the widget that you are looking for in order to show its cascading style sheet (css).
For example I am looking for the Feedjit widget in my template and after clicking the arrow I scrool down and found the set of code below.<b:widget id='HTML5' locked='false' title='Feedjit' type='HTML'>Note: Please be aware of the opening and closing tags:
<b:includable id='main'>
<b:if cond='data:blog.url != "http://bloggingtipsandtrix.blogspot.com/2013/04/var-servicedomainwww.html"'>
<!-- 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>
<b:widget id='HTML5' locked='false' title='Feedjit' type='HTML'>
<b:includable id='main'>
Closing tags:
</b:includable>
</b:widget>
Step 4. The following are tags/codes that you are going to put below the opening tags in order to:
1. Show Blogger widget only in home page,
<b:if cond='data:blog.url == data:blog.homepageUrl'>2. Show Blogger widget only in post pages
<b:if cond='data:blog.pageType == "item"'>3. Show the widget in a specific page
<b:if cond='data:blog.url == "URL of the page"'>4. Hide widget on a particular page
<b:if cond='data:blog.url != "URL of the page"'>
5. Show only widget in a static pages
<b:if cond='data:blog.pageType == "static_page"'>6. To hide widget in a static page
<b:if cond='data:blog.pageType ! = "static_page "'>7. Show widget only in Archive pages
<b:if cond='data:blog.pageType == "archive"'>8. Hide widget only in Archive pages
<b:if cond='data:blog.pageType ! = "archive"'>9. Hide Blogger widget in post pages or Show widget in home pages.
<b:if cond='data:blog.pageType != "item"'>Note.
1. Always put </b:if> above the closing tags so that code will parse correctly.
2. For conditioned number three (3) and four (4) above, replace the red bolded texts with the URL of the page.
3. But for conditioned number one (1), two (2), five (5), six (6), seven (7), eight (8), and nine (9) just simply copy the code and paste it directly to the specific widget (no more editing)
4. You can use our HTML parser to parse your code correctly.
Step 5. Click Preview and if things go correctly, hit Save Template and you are done.
Have a nice day pal and enjoy!