How to show adsense below the post title in your blogger hosted blog only on inner pages except on home page?

by Ankur Jain on January 16, 2009

Share This Article:

Adsense below the post title is known to give good CTR(Click-Through-Ratio). Here is how you can add adsense ads below every post title, only on inner pages and except the home page of your blog. [Yes, in a safe way!]

  1. Go to Dashboard > Edit HTML.
  2. Click on ‘Expand Widget Templates’.
  3. Search for <div class=’post-body’> and place your adsense code below this line.
  4. This is the most important step. Inside your adsense code’s <script type=’text/javascript’> and </script> , replace every occurrence of
    • < with &lt;
    • > with &gt;
    • with &quot;
  5. You should NOT change the < and > around script type=’text/javascript’ and /script.
  6. To show your adsense only on the inner pages and not on home page, add <b:if cond=’data:blog.pageType == &quot;item&quot;’> before the adsense code and </b:if> after the adsense code. You can also add <center> tags to center align your ads.
  7. The final code should look like this.

Regarding code changes that I have done, no need to worry about Adsense TOS violation. I have asked my Google adsense representative and according to her as long as any page’s source shows the same code as you copied from adsense account there is no problem. You can verify this by going to your page where you have put adsense. Right click and View Source (in IE) and View Page Source (In Firefox). Of course if you want to double verify this, you can always check with your adsense rep.

For those interested in testing and knowing which ad unit would perform best for them, can refer this excellent post on A/B testing from official adsense blog.

Scarlett February 11, 2009 at 11:32 AM

Thank you very much for the info!.
It works well in my blogs :)

masaji March 15, 2009 at 3:46 PM

Thank you very much. It’s a usefull topic. I have employ it for my blog and it’s work well. Thanks. :)

illustrator artwork March 24, 2009 at 4:45 PM

thanks man nice tips

Mohit March 25, 2009 at 8:49 PM

Nice trick. but I’ve a suggestion, you should place the code example in text format instead of image so that we can easily copy the code and modify that.
Thanks for the rest.

ROW March 25, 2009 at 11:47 PM

@Mohit. Thanks. Yes, that’s a good suggestion. I will try to put this in text format whenever I “ll get some time.

Mohit March 27, 2009 at 7:36 AM

@Row Thanks,
But as you know that Adsense Policy didn’t allow us to modify the Adsense Code in anyway. In such a case how will the above modification will react with the Adsense Policies. Any solution instead of that.

ROW March 27, 2009 at 8:59 AM

@Mohit: If you check the second last para above, I have clarified this with adsense reps and they are ok with it. There is no code change when the page finally renders inside your browser.

2010 leading presidentiables May 15, 2009 at 7:43 PM


Have tried it in my blog but I can’t figure out what went wrong. Have followed it based on instructions but my google ads below my post title disappeared at home and inner pages.

safri July 17, 2009 at 11:24 PM

Nice content hats off can you please help me on following queries below.
1.)how to insert ad(300*250) below post title in such away that i should align to left( pls also say about diff positions placement positions) and such that post content should begin just by the side of it .
2. how place ad below every POST iam using adbrite.
please reply……………………………
:-)Thanks in advance

safri July 27, 2009 at 6:58 PM

Hello! I do regularly visit your Blog cause i like it so much.
Can you please help me with my blogger blog
1 when i signed in for Adsense everything was OK but they later sent a mail that scripting of the page was wrong something like that
2 when I tried to move the elements of right side bar to left side bar it indicating error like yqurjh which is so unbearable.
please help me……..
I’m waiting with gr8 hope

chandan November 7, 2009 at 2:17 AM

your tip works. But previously set up ads using page element vanishes. What to do? Reply.

raja November 19, 2009 at 1:43 AM

I already installed the ads but i really need help in putting the “sponsored links” or the “advertisement” text on top of the ads. Also, how can I limit the ads to just only to the first two posts. There’s a large gap between the title and the body after the first two posts. Thanks

vectorism April 17, 2010 at 7:19 PM

thanks ; )

Pethum June 21, 2010 at 5:02 PM

Nice tip dear.Now it is working for me.

noypi October 3, 2010 at 4:54 AM

Thanks for this… Keep up the good work!

WiserBuddy October 10, 2010 at 6:36 PM

YEs!!! Thanks Bro for this, ive been searching for the right technique and your blog helped me. Thanks a lot! God Bless!

MarkWeb March 18, 2011 at 9:15 PM

Nice article. This is very useful tip.

james April 8, 2011 at 6:24 PM

good technique keep up!!

Comments on this entry are closed.

Previous post:

Next post: