Learn here to put Google AdSense Ads just after Heading(H2), Sub-heading(H3) and Minor-Heading(H3)  in the post of Blogger

Show AdSense Ads just after Headings (H2, H3 and H4) in Blogger. Put Ads code below the headings in Blogger or Blogspot blog.

Hello, Bloggers!
Welcome back. As we know that Google AdSense is the biggest platform to earn money online through advertisement on blogs and websites. As we know, after getting right traffic on our blog. We need to utilise Google AdSense in a proper way without breaking any Google AdSense terms and conditions. So, you know that after connecting your blog with AdSense. You only know about to put AdSense ads through "Add a gadget" on layout section.

We know that Google AdSense is providing responsive and matching Ads according to your contents. That's a good news for us. So, we need to utilise maximum earning revenue without breaking any Google AdSense policy. So let us start to do this.

How to show AdSense Ads just after headings?

Follow these steps to setup AdSense code just after headings.

1. First go to www.blogger.com, log in your blog and click on "Template" section on your blog.
2. Click on "Edit HTML"

Show Google ads just after headings in blogger.
3. Click left button of the mouse inside HTML code box and press (CTRL+F) to open the search box. Type <data:post.body/> inside search box and click Enter button of your keyboard.
Show Google ads just after headings in blogger.

4. After clicking on entering find out these this code. If <data:post.body/> code exists more than one times. Then go with the second one.

Show AdSense Ads Just After Headings (H2, H3 and H4) in Blogger

5. Replace <data:post.body/> this code with below codes.

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='adsense-content' style="display:block;text-align: center">


<div id='adsense-target'><data:post.body/></div>
<script type='text/javascript'>
function insertAfter(addition,target) {
var parent = target.parentNode;
if (parent.lastChild == target) {
} else {
var adscont = document.getElementById(&quot;adsense-content&quot;);
var target = document.getElementById(&quot;adsense-target&quot;);
var linebreak = target.getElementsByTagName(&quot;br&quot;);
if (linebreak.length &gt; 0){
6. Before pasting your AdSense codes inside above code. You should parse it or convert into text form. To parse the Google AdSense code click here.

7. After parsing the Google AdSense code put it into the above code or replace PASTE YOUR ADSENSE CODE  line with your converted AdSense code.

8. (&quot;br&quot;); in this code replace the bar with h2, h3 or h4 according to your use. If you want to show AdSense Ad after h3 (sub-heading) then replace the br code with h3. The code will be like this (&quot;h3&quot;); .

9. After that, your work is over. Click on save the template.

10. Before doing these all thing, you should make a backup of your template.

Hope this AdSense code setting method will be useful for you. If you need any kind of help related to this code or other code about AdSense. Please write below in the comment box. I am always with you. Thank you!

Previous Post Next Post