How to show adsense ads only on home page and not on inner pages of your blogger blog?

11

Sponsored Links


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-Add a Blogger Gadget

  1. 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. 
  2. Now go to Edit HTML. Scroll down and locate left sidebar. You will find something like this- Adsense ads only on homepage
  3. Copy the name of the first widget. In my case it is HTML6.
  4. Now click on Expand Widget Templates (given on top right) and search the name you have copied in the above step. Adsense ads on home page  
  5. You will find a similar code except what is in the red box above. Copy and paste  <b:if cond=’data:blog.pageType == &quot;index&quot;’> and </b:if>, EXACTLY at the same place as shown in the image above.
  6. 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 != &quot;index&quot;’>

Save Template’ and you’re done.

Gozar!

Digg, Stumble, Twit or share this post by clicking on any of the buttons below:
  • Digg
  • del.icio.us
  • StumbleUpon
  • Sphinn
  • Yahoo! Buzz
  • Technorati
  • TwitThis
  • Facebook
  • MySpace
  • Google Bookmarks

Want to get an update as soon as we publish new article? I recommend you to subscribe via RSS Feed. You can also subscribe by email and have new articles sent directly to your inbox. It's absolutely free!

Related posts:

  1. How to redirect blogger pages from one page to another page of same or a different blog?
  2. Reason why your Google Adsense earnings are falling
  3. How to customize PayPal payment pages and where can we find https location to store PayPal header image?
  4. WordPress for iPhone: Maintain Your Blog On-the-Go

Comments

11 Responses to “How to show adsense ads only on home page and not on inner pages of your blogger blog?”
  1. Chris says:

    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

  2. James says:

    Great article, thanks for the advice will definitely look at it for my next project.

  3. Sarah says:

    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)…

  4. ROW says:

    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.

  5. Sarah says:

    Thanks, but how to do you give readers the ability to receive an email notification to responses? Are you not hosted on blogger?

  6. guest says:

    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

  7. Avinashtech says:

    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

  8. ROW says:

    @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.

  9. Avinashtech says:

    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?

  10. tips says:

    this is very useful code,but i have question.can we use this code on wordpress blog?

    • ROW says:

      For wordpress blogs you can use any of the adsense plugins available for free, you dont need such tweaks for wordpress.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!