Click here to sign up now! and get our free newsletter via e-mail.
A gadget that you added on Sidebar or Footer always appears on our homepage and all posts pages. But you can custom its contents that are only shown on your homepage or each post page through this example.
By signing in Blogger, click on Layout tab | Edit HTML and check the "Expand Widget Templates" box. Use search keywords below to find your gadget:
For example, I want to set up for id='HTML1'. Pay attention to the highlighted code added into your template, this makes your gadget be shown on homepage:<b:widget id='HTML1' locked='false' title='' 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>
On the other way, this is shown on each post page:<b:widget id='HTML1' locked='false' title='' 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>
in Labels: Customizing gadget, Tips for gadget





1 comments: to Showing a gadget on your Blogger homepage only so far ...
thx, it works
Post a Comment