Show Blogger Widget on Particular Post or Page only

Showing a widget or gadget on particular post or page can be done easily if you are using wordpress for blogging platform because there are thousands of ready-made plugins to do that (you should read blogger vs wordpress). But what if you want to show a particular widget on some particular post, page, homepage or archive only ? or what if you dont want to show a particular widget on a particular page ?. Its not easier as there is no option for using plugins in Blogger/blogspot blogging platform. So, How you can do this in blogger ? Well, its not much difficult, only you have to follow below given instructions to show any widget on homepage, post, page or achieve.

How to Display a Widget on Particular Page ?

  • Login in your blogger account
  • Click on Design
  • Now, add a gadget, If you are adding Javascript/HTML gadget then copy the text whatever you write in TITLE of that Javascript/HTML gadget.
  • Now, click on EDIT HTML and then CHECK Expand Widget Templates.
  • Search for the Title of your Javascript/HTML. (simply, press F3 and search for title of your widget)
Suppose if your widget title is, My First Widget, then search for my first widget.

Then you will find the text which will be surrounded by this kind of code which is given below. Now, if you want to show subjected gadget only on Homepage add <b:if cond='data:blog.url == data:blog.homepageUrl'> code just below <b:includable id='main'> and </b:if> above </b:includable> as i did in below shown code.

To Show Widget on Homepage of your blog only


<b:widget id='HTML1' locked='false' title='My First Widget' 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 != &quot;&quot;'>
<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 on Post Pages (also called "single post") of your blog only



<b:widget id='HTML3' locked='false' title='My First Widget' 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 != &quot;&quot;'>
<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 Display Widget In Archive Pages


<b:widget id='HTML3' locked='false' title='Widget Title Name' 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 != &quot;&quot;'>
<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 on Particular Post


<b:widget id='HTML3' locked='false' title='Widget Title Name' type='HTML'>
<b:includable id='main'>
<b:if cond='data:blog.url == "BLOG_PAGE_URL"'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != &quot;&quot;'>
<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>

Thats it ! You should also try Blogger Page Numbers hack on your blog to add page numbers on your blog.