December 25, 2018

How To Place Adsense Ads In Middle of The Post in Blogger-Any Template Work Around Method

Placing adsense ads in middle of all the posts will give a high CTR which eventually increases earnings. In word press, There are customized plugins available for placing ads in middle of the posts. But in case of blogger it is some what tricky part to place adsense ads in middle of all the posts. We have developed a script which can place adsense ads in between the post exactly in the middle of the content. The procedure for placing adsense ads in middle of  the posts in blogger is shared below.

Place Adsense Ads Automatically In Middle of All The Posts In Blogger:

Follow The below process to place adsense ads in Middle of all the posts automatically in blogger.

Step 1:

Login to Your Blogger Account

Go to Template >Edit HTML

Step 2:

Search For Below Code in your template.


You will get multiple codes similar to above code. You have to select the second code which is similar to above code in order to make the script work properly.

Step 3:

Replace The above Code With The Below Code.

<div id='jobmiddlenew'> 
<data:post.body/> </div> 
<b:if cond='data:blog.pageType == &quot;item&quot;'> 
<style> #addcodemiddle{display: none;} </style> 
<div id='addcodemiddle'> Place Your Ad Code Here </div> 
<script type='text/javascript'> var str1=document.getElementById(&quot;jobmiddlenew&quot;).innerHTML; var str2=str1.length; var str3=str2/2; var substr = str1.substring(str3, str2); var n =;&lt;br&gt;&quot;); if(n&lt;0) { n = substr.indexOf('.'); if(n&lt;0) { n=0; } var firsthalf = str1.substring(0, str3+n+1); var secondhalf = str1.substring(str3+n+1, str2); } else { var firsthalf = str1.substring(0, str3+n+4); var secondhalf = str1.substring(str3+n+4, str2); } var addcode=&quot;<center>&quot;+document.getElementById(&quot;addcodemiddle&quot;).innerHTML+&quot;</center><br/>&quot;; var newbody=firsthalf+addcode+secondhalf; var strnew=document.getElementsByClassName(&quot;post-body entry-content&quot;); strnew[0].innerHTML=newbody; document.getElementById(&quot;addcodemiddle&quot;).innerHTML=&quot;&quot;; </script> 

Step 4

Replace The Place Your Ad Code Text With Your Adsense Ad Code in the above code and save your template.


If you are facing any kind of issue then do let us know in your comments. Happy Blogging Cheers 🙂

About the author 

Imran Uddin

Imran Uddin is a Professional blogger from India and on All Tech Buzz, he writes about Blogging, How to tips, Making money online, etc.

  1. Thanks for this amazing post. I have searching this type information. I have successfully added code on middle of post.

  2. I have tried the code but it didn’t work for me can you please provide shorts or more examples. thanks

  3. This looks like just what I need, however I am pretty computer illiterate.. I can copy/paste code usually, but how do I find the ad code and how do I copy it? I think I found the code but I can’t highlight it to copy.
    Also my posts are usually fairly short, a few hundred words at most. Can I put the ads beside the title or below the post?
    A lot of questions I know.
    I have several blogs and can practise on one of my newer ones with less to damage.

  4. pushing ads to middle earnings dropped over 30%, inserting ad unit after 1st paragraph may be some innovative idea in blogger. but top kicked by panda. especially large rectangle left floated below post title

  5. Thank you for this. It worked on my blogger site. I replaced second Datapostbody code but not worked. then there was third one, when tested with that it worked. I dont know coding but it was easy thing as you explained the process in detail.
    I liked Alltechbuzz. Its theme and the informations are great. Really inspired by you.

  6. First of All Thanks bro for sharing this useful info.

    This post is very simple I am beginner in Adsense field but after reading your post I used this code and put it in my website very easily without any efforts

  7. Wow nice bro . Adsense placement is too neccessary for higher cpm . But i have a question about that ‘ is it against the Google adsense policy ? ‘ .

  8. Thanks for the update but the problem am having is that it keeps showing some code after i inserted it ( Please can you help me with it, thanks

  9. Hello.. Nice post. This post worked for me when i was using my blogspot domain, but since i changed my domain and began to use the DFP adsense. it stopped working.. Please Help.

  10. It is saying like this , Error parsing XML, line 2474, column 15: Attribute name “async” associated with an element type “script” must be followed by the ‘ = ‘ character.

  11. That works on my site and very easily done as the way is quite simply described by you. I use to check your post regularly these are quite helpful for new bloggers. Thanks for sharing.

  12. Hey! It’s working perfectly man. Thank you for the code. Yeah! This is Original Comment. Plz remove Above comment named with Balu. Bcz I mistakenly commented with another website address

  13. Hey This is Balu Again. I want to display three ads in blogger post.
    1. Below post title
    2. Middle of the post
    3. End of the post
    How can I do it. Please Tell Me.

  14. hi imaran, i have a suggestion on this script. me used this script on my blog [] and the adsense ad displayed at the middle of my blog and everything gone correctly. But there was a problem that is the middle ad sometimes not displaying. [ most of the time the middle ad is not displaying].
    Please fix it. Due to this [ hidden some times] i was losing much ctr.
    hope you got it.

  15. Hey! I have tried the code you have placed above, It’s breaking my theme. Please help. I’m using hueman WordPress theme.

  16. Hello, Imran. I want to display ads at the bottom of the post. I displayed ad middle of the post as you said. But visitors saying that we are uncomfortable. So I want to display the ad at the bottom of the post. How can I do it.
    Please tell me.

  17. hello admin how can we display 3 ads on every page of blog and our blog loading time just 2 sec or less. but after adding more ads site loading time increased why? please give some tips

  18. Thanks for the post and it works well with blogger. I am trying to do it with WordPress but it affects the responsiveness of the site in mobile view. Is there any way to make it work in WordPress?

  19. i put codes and all according to your post but ads not showing in post ,, help me please

  20. its really works! atually i have try a lot of code from other website, and all of them is a mess when its short posting.. (appear in the post some of the template code).. but this code really works fine!

  21. hi,

    I need to create my AdSense account through youtube or blogger.
    i tried to create through youtube but there are weblink required.

    what about blogger, can i create and Activate my Adsense a/c throught blogger ?

  22. i don’t have any website but i have blogger about tracellers.

    This blog is how to create Adsense account or just add Adsense advertise. ????

  23. thanks for your article, i was struggling to find this info on web from past 1 hour. now i have landed on right page.

  24. Good post very well written Imran.. It will be very helpful to newbie bloggers.. Thanks for Sharing this info..

  25. I put your code as you explained, but it’s not working for my site. May be the theme issue or what. Is your code universally correct for all Blogger blogs?

  26. Your style is unique in comparison to other people I’ve read stuff from.
    Thank you for posting when you have the opportunity,
    Guess I will just book mark this web site.

  27. Today, while I was at work, my cousin stole my apple ipad and tested to see if it
    can survive a 25 foot drop, just so she can be a youtube sensation. My apple ipad
    is now destroyed and she has 83 views. I know this is entirely
    off topic but I had to share it with someone!

  28. Would making 8 or 10 thousand dollars 30 days
    from your simple blog change your life. Many individuals that
    are looking for ways to save money are finding out just how easy it really is whenever you buy generic.
    Writing blog posts can be a way to channel your understanding and creativity while using world.

  29. Thank you bro… Finally, you solved my problem. I was really frustrated about it.

  30. Mobile Version of script? Thank you very much for this script. It works fine on my blog on the desktop version, but not on the mobile version of the blog. The mobile version of the blog doesn’t show any advertisement in the middle of the post. Why? Thank you very much!


Comments are closed.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}