When you add any gadget /widget or adsense to your blog it will shows on all pages of your blog but sometime you might be want to have widget appear only for the homepage. If you want this, there are some great page elements feature which help you to show your adsense ad or any blogger gadget only on homepages and don't see on other post pages.for doing this you have to change little thing in your blogger setting which i describe here.
How to create Widget/Adsense Ad unit show Homepage Only
For doing this , you need to know your widget id first by following below step
- Log in to blogger.com with your username and password
- Go to Design and Locate the widget or gadget or adsense ad which you want to show only in home page
- right click on "Edit" button on that widget and then choose Copy Link Location (for more see below example)
- Paste that link to any notepad and find the widget ID which are showing after "widgetId=" that word
- copy that word
Now go to Edit HTML and expand widget templates
Press Ctrl+F and Find Widget Id which you copy earlier step
In that Line directly below widget id, you should show below code
<b:includable id='main'>
Immediately below this, paste the below code
<b:if cond='data:blog.url == data:blog.homepageUrl'>
Now Scroll down a few link you find below code
</b:includable>
Just above code, paste below code
</b:if>
Now save templates and you will now see the result... your widget show on homepages only.