Selective Display of Blogger Widgets on Posts-Homepage-Archive ,post page, or particular pages.
Now go to "Edit HTML" page.
Mark "Expand Widget Templates"
And Search for
<b:widget id='HTML3' locked='false' title='Your Title name you gave to your widget' type='HTML'>
The number in red can be any like 1,2,3,4 it depends on your no of widget your are adding but the title to the widget you gave will be same.
So to make the widget code find easily for you find the below word
<b:widget id='HTML
and you will find many codes like these so keep on matchng the title name of widget of them to which you want to show on different pages.
A: To display the any Blogger widget only in HomePage
<b:widget id='HTML5' locked='false' title='Widget Title Name' 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>
Add the blue codes as shown above in codes whch you found for that particular widget in your blog html.
B: To display widget in all posts pages but not in HomePage
<b:widget id='HTML3' locked='false' title='Widget Title 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>
C: 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 != ""'>
<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>
D: Displaying something on static pages only
<b:if cond='data:blog.pageType == "static_page"'>
Hii this is a static page
</b:if>
E: Displaying something on all other than static pages
<b:if cond='data:blog.pageType != "static_page"'>
Hii this is not a static page
</b:if>
How To: Blogger Widget Tricks, Post page, Posts-Homepage-Archive
on
loading..
Got Something to Add?
0
comments:
Post a Comment
Home
» blogger tutorial and tricks
» Widgets
» How To: Blogger Widget Tricks, Post page, Posts-Homepage-Archive