How can I change adsense location in Blogspot?

Le Hoang July 16, 2010

My blog is

I’m having some trouble with adding adsense code to my post. I’m using Blogspot. I use the jump break feature to let people view a short part of my post. But when I add adsense code above the content, the ads show up in the preview of the post (at homepage).

How can I let adsense only show up when people view the whole article? Like on MakeUseOf.

  1. Georgep8000
    March 3, 2011 at 6:23 pm

    little bit easy little bit difficult to place ad, follow the answer above can find solution

  2. Anonymous
    July 22, 2010 at 4:06 am

    Guys!!! It's doesn't work! Any idea?

    • Anshul Dixit
      July 22, 2010 at 4:18 am

      Did you get any error ? Are you using a widget for Adsense or using it directly in template ? Can you briefly state what all you did ?

  3. Anonymous
    July 21, 2010 at 4:54 am

    Great!! Thanks

  4. Anshul Dixit
    July 19, 2010 at 10:44 am

    You can accomplish this by playing around a bit with the html code of the template. You’ll have to use if-else condition to display adsense on the desired page. Before we do that, you should first know what are the various page types in blogger and how they are referred in a template:1) Main page or home Page : index2) Post Page: item3) Static Page: static_pageNow for your scenario you should add the adsense code only in item page. I’m assuming that you are adding adsense code directly in the template (I’ll also tell you what to do if you are using a page element to add adsense code). For this, wrap your Adsense code with the if condition so that the final code looks like:ADSENSE CODE</b:if This will show the ads only when people view the whole article.If you want to show ads on static pages as well as post page but not on home page then use the following code:ADSENSE CODE</b:if If you are using a page element (i.e. gadget) to add adsense code in your template then follow the following approach:1) First name the corresponding page element with whatever name you want by going to Dashboard->Design->PageElement. Naming the page element will help identify the section easily in the html. In case it already has a name, just make a note of it.2) Now go to Edit HTML and check Expand Widget.3) Using Ctrl+F, search for the name you noted in step 1 above.4) You’ll find a code something like this <b:widget id='HTML5' locked='false' title='Adsense' type='HTML' <b:includable id='main' </b:includable </b:widget5) Now just as we did in the previous case, add the if condition to the above code so that the final code will look like: <b:widget id='HTML5' locked='false' title='Adsense' type='HTML' <b:includable id='main' <b:if cond='data:blog.pageType == "item"' </b:if </b:includable </b:widgetUsing this approach you can selectively display other gadgets also on post page, home page or static page. Hope this answers your question.NOTE: In the answer, the code snippet starting with “”. Due to reasons I don’t know, if I close the tag, the entire line vanishes from the answer. So I have kept it open. But remember to close the tags in your template by using “>” (without quotes).

    • Aibek
      July 20, 2010 at 8:22 am


      Thanks for providing such a comprehensive answer!

      • Anonymous
        July 22, 2010 at 4:07 am

        It doesn't work

        • Aibek
          July 22, 2010 at 8:47 pm

          I see, what exactly didn't work for you?

        • Anshul Dixit
          July 25, 2010 at 4:01 am

          I have implemented this on my blog and it is working fine for me. I don't have Adsense account so I have done it for Infolinks ads. You won't see any ads on my home page but when you open any post you'll see ads there. Check it at Just click on any post and see the ads.

          You must have missed some small thing. If you could tell us what exactly is the problem you are facing we can help you out.

        • Anshul Dixit
          July 27, 2010 at 2:11 pm

          Hope Le Hoang you checked it by now, since I'm removing ads from my blog now (I like it without ads :) )

Ads by Google