How Show Blogger Widget Only In Posts-Homepage-Archive Pages



How to Show Blogger Widget Only In Home Page Or Post Pages of blogger,as you have seen in wordpress blog its your wish to what widget and what add you want to show in sidebar of that page but this service cant be used in blogger as all sidebar bar widgets are linked to all pages in blogger including home page but now you can select the option which sidebar widget you want to show in blogger homepage and which one in all other blogger post pages.

As one more beautiful hack how to show only post titles in blogger home and label pages has also been released,dont forget to red about it.

Lets follow on this tutorial i.e how to show blogger widget only in home page or blogger posts pages.

Add the widget in blogger layout where you want to display in blogger.Now you wnt to select on which pages of blogger it should be displayed.

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.

After finding the code of widget you want to display on different pages add the red codes to them as i have shown below.

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 != &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>


Add the red codes as shown above in codes whch you found for that particular widget in your blog html.

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 != &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>

If you have any problem leave your comments.

19 comments:

KAPUSO ONLINE BLOGSPOT ADMIN said...

this is a great hack

thanks

sir, what if i want to limit my archive results to 3 post only, i dont want to use the archive post title hack since my ads are embedded to my post

thanks a lot

KAPUSO ONLINE BLOGSPOT ADMIN said...

or may be what if i want to show post titles only in archives page but not in labels

it is possible?

thanks a lot

Anshul said...

ya as you said after you said i tried to show show only post titles in archive pages and i was succesful.

Go To this post Post title in selected pages i edited this post to answer yur question.

gambling casinos said...

I would advice you to let this be applied to labels too, as even labels pages become too long, when visitors click on any label. By this method as only titles are shown in the result page, so people can then easily select the post they want.

JohnPatra said...

hi my friend!
thanks for this hack!
it is very good!
i am from greece!

kool said...

Thanks bro, this helped a lot.

adobe basics said...

sir you have genius to gave blogger hacks thanks once more time.

xJaike said...

if i like a post i click the ads several times :D .
i liked this one .

U just won 20 clicks on ur ads :D

xJaike said...

thx this one was the best result in google :D gpna click ur ads 20 times :D

Anshul said...

@x.janike i dont want fraud clicks so it would be great if you will not click my adds until you really wanna check content there.As i could get ban my account from your fraud clicks.

jaike said...

@Anshul i didnt know tht sry x.x

http://www.21slots.co.uk/ said...

Code which you have given above,Just i try it at home and it really works for me.I think you have spend a lot of time to make this more useful.You have done a genious work.

Aman S. Aneja said...

Thats really cool post brother! thanks for sharing

Sahil said...

how to show no widgets on archive page...
i dont wanna display any widget on archive page ??????????

Anshul said...

@sahil in the third code i told showd you one line in red this one

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

when u will use this it will show widget only on archive page.But use like it then will show not widget on archive page.

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

SHREYAS said...

thanks for Sharing
http://aksahworld.blogspot.com/

!i! KSAK !i! said...

its not working properly on my page!

arts said...

This article was very helpful!!


Pixellicious Photos

Post a Comment