News Today

« »

Tuesday, July 3, 2012

How to display widgets only on home page of blogger


It mean widget display only on homepage and hide from post,static and archive page.Simply enclose the code inside HTML/JavaScript widget between these lines,

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

WIDGET CODE GOES HERE

</b:if>

where WIDGET CODE GOES HERE is the code of the widget you want to show or hide.

2.How to display widgets only on post pages of blogger

It mean widget display only on post pages and hide from homepage,static and archive page.Simply enclose the code inside HTML/JavaScript widget between these lines,

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

WIDGET CODE GOES HERE

</b:if>

3.How to display widgets only on static pages of blogger.

It mean widget display only on static pages and hide from homepage,post and archive pages.Simply enclose the code inside HTML/JavaScript widget between these lines,

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

WIDGET CODE GOES HERE

</b:if>

4.How to display widgets on post pages and static pages of blogger.

It mean widget display on post pages & static pages and hide from homepage.Simply enclose the code inside HTML/JavaScript widget between these lines,

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

WIDGET CODE GOES HERE

</b:if>

5.How to display widgets on home page and static pages of blogger.

It mean widget display on static pages & home page and hide from post pages.Simply enclose the code inside HTML/JavaScript widget between these lines,

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

WIDGET CODE GOES HERE

</b:if>

6.How to display widgets in home page and posts pages of blogger.

It mean widget display on home page and posts pages and hide from static pages.Simply enclose the code inside HTML/JavaScript widget between these lines,

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

WIDGET CODE GOES HERE

</b:if>

7.How to display widgets only on archive pages of blogger.

It mean widget display on archive pages and hide from any other pages.Simply enclose the code inside HTML/JavaScript widget between these lines,

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

WIDGET CODE GOES HERE

</b:if>


8.How to display widgets only on a specific page of blogger.

It mean widget display on specific page and hide from any other pages.Simply enclose the code inside HTML/JavaScript widget between these lines,

<b:if cond='data:blog.url == &quot;Your_URL_Here&quot;'>

WIDGET CODE GOES HERE

</b:if>

9.How to display widgets except any one specific page of blogger.

It mean widget display on all page without selected specific page.Simply enclose the code inside HTML/JavaScript widget between these lines,

<b:if cond='data:blog.url != &quot;Your_URL_Here&quot;'>

WIDGET CODE GOES HERE

</b:if>

  • In the 8th case put your page url instead of Your_URL_Here,at which you want to display gadget and in the 9th case you have to put your page url at which you don't display gadget.

How To Control Blogger’s Official Widgets?

The same procedure can be applied to Blogger’s official widgets like About Me, Archives, Poll etc. For controlling that widgets do this,

1.Go To Blogger > Design > Edit HTML
2.Backup your template
3.Check the Expand Widgets Templates Box
4.Search for the title of the widget you want to control
5.The code for the widget will look something similar to this one,

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

LARGE PART OF WIDGET CODE

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

To explore the title in place of WIDGET-TITLE-HERE you will find two similar codes like those I have shown in bolded green You just need to add the Controlling codes in the following manner.For example if you wish to show a widget at post pages only then do this see below,

<b:widget id="HTML" locked="false" title="WIDGET-TITLE-HERE" type="Profile">
<b:includable id="main">
<b:if cond='data:blog.pageType == &quot;item&quot;'>
LARGE CHUNK OF WIDGET CODE
</b:includable> 
</b:widget>

0 comments :

Post a Comment