How to Display Blogger Widgets Only in Home Page

Blogger Widget screen shotHow to Show Blogger Widget Only In Home Page like that in wordpress. There is no inbuilt feature from blogger for the same job. But displaying blogger widgets in home page and without displaying it in other pages is very easy. For that you need to make sure which blogger widget should display on the home page.

Adding a widget to blogger.

As a first step you need to add a blogger widget. Just go to lay out section(New Blogger interface) and add a particular widget. Check you blog to confirm it is appearing properly. Remember which kind of widget you added to your blog.

Finding code for widgets in templates

1. Before changing the codes try to back up your blogger template to avoid problems if something went wrong. Go to template section on left side bar of a particular blog.
On the top right corner you can find Backup/Restore. Shout it and download full template.
2. After completing back up of your full blogger template again come back to template section. Edit html>>>Expand widgets. Search for the following code in your template
For adsense widget it should like this

<b:widget id='AdSense2' locked='false' title='' type='AdSense'><b:includable id='main'>

<div class='widget-content'>

<data:adCode/>

<b:include name='quickedit'/>

</div>

</b:includable>

</b:widget>

 

For a html widget it should look like this


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

Making it visible only in home page
After

<b:includable id='main'>

add a single line of code

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

And before

</b:includable>

It add closing tag

</b:if>

After adding necessary codes save your blogger template. And view your home page and other pages or post pages to verify the changes that you previously did.

If you have any further Queries about it leave a comment.

Blogger Blogs , blogging , how to , Widgets

RELATED