20 Ways To Make $5000+ From Home. Earn Now!

Table of Content

Show/Hide/Widgets/In Home/Post/Static&Archive Pages

how to Show Hide Widgets gadgets In Home Posts Static Archive Pages in for blogger blogspot.display blogger widgets on homepage,static pages,archive page,labels,hide widget from specific posts.
How Show/Hide/Widgets/In/Home/Post/Static/Archive Pages For Blogger
You may have noticed, all the widgets/gadgets you add to your blog, will be displayed on all the pages by default, including the homepage as well. To hide or show widgets/gadgets in particular posts,static pages,homepage and archive pages, you can use following conditional tags.

1. Log in to blogger account
2. Now select Template
3. Now Click EDIT HTML Button
4. Now  Find your HTML Widget name by using CTRL+F

Example:let's say the name one of my widget is "PopularPosts" after searching widget name i will find the similar code in every template i.e
 <b:widget id='HTML1' locked='false' title='PopularPosts' type='HTML'>
<b:includable id='main'>
<!-- 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:includable>
</b:widget>  
*This code represents the widget/gadget i have added in page elements (Layout).

5. After you have found your widget code,add the following conditional tags in blue just below,to hide the widget from specific pages or posts in blogger.

To Show Widget Only In Homepage:

 <b:widget id='HTML1' locked='false' title='PopularPosts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == data:blog.homepageUrl'><!-- 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>

To Show Widget Only In Post Pages: 

<b:widget id='HTML1' locked='false' title='PopularPosts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'><!-- 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>

To Hide Blogger Widget In Post Pages: 

 <b:widget id='HTML1' locked='false' title='PopularPosts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType!= "item"'><!-- 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>

To Show The Blogger Widget In A Specific Pages: 

 <b:widget id='HTML1' locked='false' title='PopularPosts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == "URL OF THE PAGE"'><!-- 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>

To Hide A Widget Only In A Particular Pages: 

 <b:widget id='HTML1' locked='false' title='PopularPosts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url != "URL OF THE PAGE"'><!-- 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> 

To Show Widget Only In Static Pages: 

 <b:widget id='HTML1' locked='false' title='PopularPosts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "static_page"'><!-- 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> 

To Hide Widgets In Static Pages: 

<b:widget id='HTML1' locked='false' title='PopularPosts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType != "static_page"'><!-- 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> 

To Show Widgets Only In Archive Pages: 

 <b:widget id='HTML1' locked='false' title='PopularPosts' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "archive"'><!-- 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> 
6. Now save your HTML/Javascript',Done! 

Post a Comment