Wednesday, December 22, 2010

How To Show Widget Only In "Home"

Actually, this trick is "sequel" of How To Show Widget Only In Next Page (Not in "Home"). So, what's the difference? The difference is this trick only show the widget in "Home". As an example, we will edit the "Get Free Banner!" widget. OK, you just follow the steps, if you want to try this trick.

1. Log in to your blogger account
2. Go to Design>>>Edit HTML>>>
3. Thick "Expand Widget Templates"
4. Then, search the code below
Tips : To speed up your search, you can use Ctrl+F or F3

<b:widget id='HTML3' locked='false' title='Get Free Banner!' type='HTML'>
<b:includable id='main'>


<!-- 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:includable>
</b:widget>
(becase we will edit "Get Free Banner!")

5. After that copy the code below

<b:if cond='data:blog.homepageUrl == data:blog.url'>

6. Paste under

<b:widget id='HTML3' locked='false' title='Get Free Banner!' type='HTML'>
<b:includable id='main'>

7. Then, copy the code below

</b:if>

8. And paste under

<b:include name='quickedit'/>

So the result will look like this

<b:widget id='HTML3' locked='false' title='Get Free Banner!' type='HTML'>
<b:includable id='main'>

<b:if cond='data:blog.homepageUrl == data:blog.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>

9. If you finish, save it
NOTE : Can also be applied in other widgets

No comments:

Post a Comment