How To Hide Blogger Widgets In Certain OR Specific Pages

Hide Widgets In Blogger On Certain Pages

While blogging every one faces situation in which some content of blog is to be restricted to some pages.I mean to say hiding blogger widget content on some pages for example to hide widgets in contact us or privacy policiy page.Furthermore you can do so if you want your blogger to look professional and clean.
In this case the best example is that google adsense do not allow their publishers to show their ads on contact us or privacy policy page and they inly allow 3 ads per page if you do not follow these they could ban you.
In this article i will let you know how you can avoid above problems and hide specific blogger widgets on specfic pages of your blogger blog.Lets Start,
Follow these steps:
Step 1 : Go to Blogger>Dashboard>Layout>Edit Html and find widget you want to hide or restrict to some pages.Press Cntrl+F and your widget name you want to restric on some pages.For Example i will search for Header Ads if my widget name is Header Ads.
Step 2 : Expand the widget code.For doing so you can click ... dots after your widget name.Your will see codes like this.
<b:widget id= 'HTML11' locked='false' title='Popular posts' type='HTML'> <b:includable id='main'> Widget code </b:includable></b:widget>
Step 3 : Now we need to show or restrict widget to some page so we will add a conditional statement.
Following are example you can follow them for your desiring results.

Show Blogger Widget in Homepage Only

Step 1 : Add following line after <b:includable id='main'>
<b:if cond='data:blog.pageType == data:blog.homepageUrl'>
Step 2 : Add </b:if> before </b:includable>.As shown in given example.
<b:widget id= 'HTML11' locked='false' title='Popular posts' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType == data:blog.homepageUrl'>Widget code</b:if></b:includable></b:widget>


Hide Blogger Widget Only In Homepage

Step 1 : Add following line after <b:includable id='main'>
<b:if cond='data:blog.pageType != data:blog.homepageUrl'>

Step 2 : Add </b:if> before </b:includable>.As shown in given example.
<b:widget id= 'HTML11' locked='false' title='Popular posts' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType != data:blog.homepageUrl'>Widget code</b:if></b:includable></b:widget>


 Show a Widget only in Post Pages

Step:1 Add following line after <b:includable id='main'>

<b:if cond='data:blog.pageType == "item"'>

Step 2 : Add </b:if> before </b:includable>.As shown in given example.
<b:widget id= 'HTML11' locked='false' title='Popular posts' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType == "item"'>Widget code</b:if></b:includable></b:widget>


Hide a Widget only in Post Pages

Step:1 Add following line after <b:includable id='main'>
<b:if cond='data:blog.pageType != "item"'>

Step 2 : Add </b:if> before </b:includable>.As shown in given example.
<b:widget id= 'HTML11' locked='false' title='Popular posts' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType != "item"'>Widget code</b:if></b:includable></b:widget>


Show a Widget only in a Specific Page or post

Step 1 : Add following line after <b:includable id='main'>
<b:if cond='data:blog.pageType == "URL of the page or post"'>

Step 2 : Add </b:if> before </b:includable>.As shown in given example.
<b:if cond='data:blog.pageType == "URL of the page or post"'>

Replace URl of the pages or post with your specific page or post.


Hide a Widget only in a specific Page or post

Step 1 : Add following line after <b:includable id='main'>
<b:if cond='data:blog.pageType != "URL of the page or post"'>

Step 2 : Add </b:if> before </b:includable>.As shown in given example.
<b:widget id= 'HTML11' locked='false' title='Popular posts' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType != "URL of the page or post"'>Widget code</b:if></b:includable></b:widget>

Replace URl of the pages or post with your specific page or post.

Show a Widget only in Static Pages

Step 1 : Add following line after <b:includable id='main'>
<b:if cond='data:blog.pageType == "static_page"'>

Step 2 : Add </b:if> before </b:includable>.As shown in given example.
<b:widget id= 'HTML11' locked='false' title='Popular posts' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType == "static_page"'>code</b:if></b:includable></b:widget>

Hide a Widget only in Static Pages

Step 1 :Add following line after <b:includable id='main'>
<b:if cond='data:blog.pageType !== "static_page"'>

Step 2 : Add </b:if> before </b:includable>.As shown in given example.
<b:widget id= 'HTML11' locked='false' title='Popular posts' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType !== "static_page"'>code</b:if></b:includable></b:widget>

Show a Widget only in Archive Pages

Step 1 : Add following line after <b:includable id='main'>
<b:if cond='data:blog.pageType == "archive"'>

Step 2 : Add </b:if> before </b:includable>.As shown in given example.
<b:widget id= 'HTML11' locked='false' title='Popular posts' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType == "archive"'>code</b:if></b:includable></b:widget>

Hide a Widget only in Archive Pages

Step 1 : Add following line after <b:includable id='main'>
<b:if cond='data:blog.pageType !== "archive"'>
Step 2 : Add </b:if> before </b:includable>.As shown in given example.
<b:widget id= 'HTML11' locked='false' title='Popular posts' type='HTML'><b:includable id='main'><b:if cond='data:blog.pageType !== "archive"'>code</b:if></b:includable></b:widget>
After adding condition tags just save the templete and you are all set.Have any problem or question feel free to comment.
Tagged With
  • How to hide widgets in blogger
  • How to hide or show blogger widgets in blogger blog.
  • How to hide blogger widgets
  • How to show blogger widgets in certain pages
  • How to restrict blogger widgets to some pages
  • How to hide or show blogger widgets in home page
  • How to hide or show blogger widgets in post pages
  • How to hide or show blogger widgets in certain pages of blogger blog.

2 Comments

Post a Comment
Previous Post Next Post