Here I assume that you are using the blogger beta and not on the classic one. It’s been a long time now that blogger has moved to beta. There is no reason for you to remain on classic version now.
You want to show adsense ads on sidebar of the home page of your blogger blog and not on the other pages OR you want to show adsense ads on all pages except the homepage of your blogspot blog. Here is what you can do-
- LogIn to the blogger dashboard. Go to Layout. Say you want to show ad on the left sidebar top. Click on “Add a Gadget” on LHS of layout and enter your adsense code.
- Now go to Edit HTML. Scroll down and locate left sidebar. You will find something like this-
- Copy the name of the first widget. In my case it is HTML6.
- Now click on Expand Widget Templates (given on top right) and search the name you have copied in the above step.
- You will find a similar code except what is in the red box above. Copy and paste
<b:if cond='data:blog.pageType == "index"'>
and
</b:if>
, EXACTLY at the same place as shown in the image above.
- If you want to show ads on all pages except on the home page then copy and paste this
<b:if cond='data:blog.pageType != "index"'>
Save Template’ and you’re done.
Gozar!
thank you very much!
How I show ads appear in inner page not on the home page of sidebar of blogger template.
Thanks for the tip, Every page of my blog (wordpress) shows adsense ads except the header (home page, about, contact and articles doesn’t show up. Do you have any suggestion what widget can be used for my blog? thanks.
this is very useful code,but i have question.can we use this code on wordpress blog?
For wordpress blogs you can use any of the adsense plugins available for free, you dont need such tweaks for wordpress.
Thanks ROW,
I was aware of that 3 ads limit of adsense as per adsense TOS. Do you know by anyway can we achieve that on home page with 3 ads only but no blank spaces left after 3 ads?
@AvinashTech: This is because adsense TOS does not allow you to put more than 3 ads(ad units) on a single page.
If you are trying to embed ads withing posts, my suggestion is to go for ads only on your inner pages and not on home page.
i am trying to put the ads just below tiles of posts on home page and i am partially successful too but my problem is , after showing three adsense ads in 3 posts, the other posts on home page show Blank space( same size as that of adsense).. any help?.Mine is a customised template
nice 😉 tnx!
but when I click on my labels it shows me anyway my gadget …it works only whan I click on my post title
any suggestion?
tnx
Thanks, but how to do you give readers the ability to receive an email notification to responses? Are you not hosted on blogger?
1) I see your blog is hosted on Blogger platform. Blogger provides an option to either make comment box open in a pop-up window OR on the same page. You can change settings from the dashboard.
2) I think the trick should be same as shown above except that you would need to write the full href for those 5 label pages in the if condition.
2 questions:
1) How can I get a comment box like yours?
2) How can I get a widget to show up on all my pages except 5 label pages (the page that shows up when you click on label)…
Great article, thanks for the advice will definitely look at it for my next project.
Thank you very much for this tip. However, I couldn’t get it to work at first because the single quotes you use in the text do not work in html. I finally figured that out and once I changed the single quotes to ‘ then it worked great. THX