How to Show or Hide Widgets on Specific Blogger Pages

Sometimes people wishing to demo around widgets on few parts of their website, thence it unnecessarily does non decrease the speed of other pages. Blogger BlogSpot users ever complain that they cannot display gadgets on the specific business office of their website i.e. Homepages, Post Pages together with Static pages, but straight off it is extremely straightforward to throttle around widgets on for sure pages. There are numberless reasons why a mortal wants to demo gadget on for sure pages because it could endure anything. Consider a mortal created a featured content slider widget but he wants to display it alone on the homepage. Therefore, those who are anxiously looking for a method of restricting widgets on specific pages then, today inwards this article, nosotros volition acquire How to Show together with Hide Blogger Widgets on Specific Pages?

How To Display a Certain Gadget on Specific Pages?


1. How to Display a Widget alone on Homepage?
Just glue the HTML/JavaScript or CSS Coding betwixt these lines. It volition demo the gadget alone on the homepage of your website. It would enshroud the gadget from Post pages together with static pages. 

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

WIDGET CODE GOES HERE

</b:if>



2. How to Hide a Widget on Homepage?
The next coding tin endure used if someone wants to restrict/hide a widget from the homepage of his site. Just add together your HTML gadget coding betwixt 2 lines. It would demo the gadget on each together with every page except homepage. 

<b:if cond=’data:blog.pageType == “item”‘>

WIDGET CODE GOES HERE

</b:if>



3. How To Display a Widget alone on Posts?
If anyone wants to demo a gadget alone on postal service pages, thence purpose the next coding. By using the next coding the gadget would alone appear on your Posts.

<b:if cond=’data:blog.pageType == “item”‘>

WIDGET CODE GOES HERE

</b:if>



4. How To Display a Widget on Static pages?
If anyone wants to enshroud a gadget from his Static pages then, he tin purpose the next coding. It would appear alone on Static Pages.

<b:if cond=’data:blog.pageType == “static_page”‘>

WIDGET CODE GOES HERE

</b:if>


5. How to display a Widget on Archive pages?

If anyone desires to demo a gadget on Archive pages of your website then, purpose the next coding. It would enshroud it from each together with every page, aspect the archive pages. 

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

WIDGET CODE GOES HERE

</b:if>


6. How to display a Widget on Homepage together with Post Pages?

Sometime, nosotros wishing to demo for sure HTML Coding on the homepage together with posts. In this case, purpose the next coding together with it would enshroud the gadget from Static pages. However, it would hold on appearing on Home together with posts of your site. 

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

WIDGET CODE GOES HERE

</b:if>


7. How to Display a Widget on Homepage together with Static Page? 
Apply the same instructions over here. It should enshroud the gadget from posts of your site. However, it would cash inwards one’s chips on to display them on dwelling together with static pages. 

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

WIDGET CODE GOES HERE

</b:if>


8. How to Display a Widget on Posts together with Static Pages? 
By using this coding the gadget would appear on Posts together with Static pages. However, it would rest hidden from homepages. 

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

WIDGET CODE GOES HERE

</b:if>


How To Control Blogger’s Official Widgets? 

We tin apply the same procedure on Blogger’s Official widgets. In fact,  these status is applicable through out the blogger platform. Which means, nosotros tin purpose these weather condition during our Posts, Layout together with etc. For Controlling widgets produce every bit followers.

  • Go to Blogger >> Template >> Edit HTML  >> Proceed. 
  • Check the Expand Widgets Templates Box
  • Search for the championship of the widget you lot wishing to control
  • The code which you lot would honor mightiness aspect something like to this one,

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

Widget CODE (Large Chunk) 

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


On finding the coding every bit mentioned above, you lot accept to Add <b:if> weather condition merely betwixt these 2 tags <b:includable id=’main’></b:includable> . After adding the <b:if> weather condition the coding would aspect something like to this one. 

<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>


All Done: That’s it, Save the template past times pressing “Save Template Button”. We promise this technique would help everyone to ameliorate their site speed by restricting unused widget  on for sure pages. Feel costless to acquire out your comments together with suggestion, Till thence Peace, Blessings together with happy blogging.


Sumber http://www.mybloggerlab.com