Monday 21 April 2014

How to Show and Hide Widgets in Blogger Specific Pages


Show and hide widgets in blogger
Today i come again with one another interesting tips that would help you display or hide blogger widget on specific parts of your blog. Guys sometime you might be noticed that whenever we add a gadget in blogger default home page then it would appear on all static pages like home page, about me page, downloaded page and post pages. Being a blogger user sometime we need to remove unnecessary widgets from specif pages in blogger and want to show our desires  widgets on certain pages according to our need. So by playing with such trick it will not only bring beauty in blog statics pages but it would also help in blog faster loading time. So in today article we will show you how to show and hide widget in blogger specific pages.


These days we continuously see a lot of blogger user complaints on blogging forum how to, how to show widget on selected pages in blogger blog. how to hide widgets on certain pages, and many mores. i have personally got too much emails complaints on PBT from our loyal readers they have voiced is there any way to put specific widgets on certain pages in blogger blog. Yes absolutely you may put any gadget on specific lactation in blogger blog without template customization. You will just only need to add a piece of chunk code in your template.
To hide or Show Gadget in any manners we have provided all the possible way to customized them for any part, location of your blog. the only thing you will need to add your desire gadget code which you want to show or hide and that will be simply enclosed in two lines. In each case you will add your code and past in between those two lines. Remember you must be replace your gadget code with Gadget Code Will Go here So the same procedure implemented in each case. Lets take an examples.

Show or Hide Widget in Blogger


You might Like:  How to Resize all Images in Blogger Posts

How to Show Widgets Only On Homepage ?

Past Your desire Widgets html/javascript codes between the below two lines. It would display the gadget only on your website home page. It would also hide the same gadget from all of your statics pages and posts pages and it will only remain on homepage.

   <b:if cond='data:blog.url == data:blog.homepageUrl'>

    WIDGET CODE WILL GO HERE

    </b:if>

How to Hide Widgets on Homepage ?

Past your gadget html/javascript between these two lines. It will hide the gadgets from home page and will show the gadgets on all posts and static pages. So to do this just place the code in below given lines.

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

    WIDGET CODE WILL GO HERE

    </b:if>

How To Show Widgets Only On Static Pages?

If you want to display a widgets only on static pages then past your desire gadget coding between in the two lines. So just add the gadget code in two lines and then save your template you will see the gadget only on statics pages.

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

    WIDGET CODE WILL GO HERE

    </b:if>

How To Hide Widgets On Static Pages?

If you wish to hide all the gadget from static page then past put your desire gadget code between the below given two line. copy gadget code and replace with the widget code goes here.

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

    WIDGET CODE WILL GO HERE

    </b:if>

How To Show Widgets On Selected Post Only?

If you want to show some gadget only on your specifics and selected posts. then you may use the following code. enclose your gadget coding between the below these two lines. Remember you must be replace your desire post link with the blue color URL Of Selected Post code.


    <b:if cond='data:blog.url == "URL OF Selected Post"'>

    WIDGET CODE WILL GO HERE

    </b:if>

How To Hide Widgets On Selected Post?

if someone want to hide all the gadget from the selected posts then add your gadget coding in the below tow lines codes. Remember you must be past your desire post link and replace with blue color code URL Of Selected Post.


    <b:if cond='data:blog.url != "URL OF Selected Post"'>

    WIDGET CODE WILL GO HERE

    </b:if>

How to Display Widgets on Archive pages ?

Sometime we need to show a widget only on archive page. So to that we will need to add a gadget code between these two lines code. copy gadget code and replace with the widget code goes here

    <b:if cond='data:blog.pageType == &quot;archive&quot;'>

    WIDGET CODE WILL GO HERE

    </b:if>

How to Display Widget on Post Pages and Homepage

Many of us sometime we want to show gadget on homepage and post pages so in such case we will use the following codes to appearing only on these pages. it will disable the gadget from all the pages except home page and post pages.

    <b:if cond='data:blog.pageType != &quot;static_page&quot;'>

    WIDGET CODE WILL GO HERE

    </b:if>

How to Display Widget on Homepage and Static Pages

If anyone want to display widget only on home page and static pages then add your gadget code and past between the below two lines. it will hide the gadgets from all other pages except home pages and static page.

    <b:if cond='data:blog.pageType != &quot;item&quot;'>

    WIDGET CODE WILL GO HERE

    </b:if>
   

How to Display Widgets on Posts and Static Pages?

Are you interested to call your gadget only on posts and static pages if yes. the add your desire gadget code in between these two lines. copy gadget code and replace with the widget code goes here

   <b:if cond='data:blog.pageType != &quot;index&quot;'>

    WIDGET CODE WILL GO HERE

    </b:if>

How To Control Blogger's Official Widgets?

You could easily hide and show blogger official or builten widget (about me, Archive ,Polls, Wikipedia box) by following the same procedure. Now in this section you will learn how to control blogger official widget to place them anywhere in blog according to your choice. Let go how to do this.>>

  • Go to Blogger >> Template >> Edit html.
  • Now Search for the title of that widget which you want to control
  • The code which you will find might be similar like this one.


<b:widget id='HTML' locked='false' title='WIDGET-TITLE-HERE' type='Profile'>
<b:includable id='main'>

LARGE WIDGET CODE

</b:includable>
</b:widget>
Now once you find your desire gadget title coding in template which you want to show or hide>> your specific Title instead of ( WIDGET-TITLE-HERE ) like (About M) or (Google Plus) . This will somewhere  also consist of the follow two tags which i have colored blue.   <b:includable id='main'> and </b:includable> So the desire code will must with these two tags. 

Now when you find this code in your template >> you will need to add your gadget coding inside  <b:includable id='main'> and </b:includable>.   To give you the illustrative example just loot at the below coding.

In this example i will show you how to add show blogger official widget only on home page.

<b:widget id='HTML' locked='false' title='WIDGET-TITLE-HERE' type='Profile'>
    <b:includable id='main'>

    <b:if cond='data:blog.url == data:blog.homepageUrl'>

    LARGE CHUNK OF WIDGET CODE

    </b:if>

    </b:includable>
    </b:widget>




Need Help

Guys This was little about all the possible ways how we could easily hide and show widget on curtains pages in blogger. We hope that that this technique will improve your knowledge and will make you able to add any widget in any part of your blog without any hard movement. So in this way you could easily customize your widget to show them on specific locations. So guys if getting any problem in implementation and wants quick troubleshooting then the below comment section is only for you to post your queries. Love and Post your Views With PBT readers.