Show Widget Only On Post Pages

Some of the customized gadgets are meant for post pages only. Though there is no direct setting available to change the gadget roles on different pages but you can customize them with some codes.



Show Widget Only On Post Pages



Here is a piece of code by which you can control the visibility of gadget on your blog.

You might also like this article on:-

How to show widget on a specific page only


To show widget only on post pages, just follow some simple steps:-


  • Open blogger.
  • Add a gadget or give a name to any gadget you want to show only on post pages. You can remove the name later but it will be easy for you to find a gadget in template with name.
  • Now, go to


Template > Edit HTML > Jump to widget > Select the name of the widget 

You can also find the widget by CTRL+F command. Just press CTRL+F and paste the name of the widget in the search box. 


  • You'll see something like this


<b:widget id='HTML1' locked='false' title='Widget Name' 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> 



  • Now, add the code in blue color same like this



<b:widget id='HTML1' locked='false' title='Widget Name' 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>


  • Save your template and visit your blog for the live changes.



Note 'Widget Name' is the name of the widget you gave in the start.

I like blogging as much as I like coding and designing though not more than traveling.
If I'm not here publishing stuff then you will find me researching about SEO and marketing.
Love to meet new people and try to help every person.
Find me interesting or have any issue?
Shoot a message and I'll be with you.

0 comments:

Don't forget to check 'Notify me' box to get notification of reply.