HOT!Buy Ready-Made Authority WebsitesClick Here

Making Blogger Professional, Important Updates !!

Hello SoraBloggingTips Readers, If you are reading this, then we would like to appreciate your efforts for being supportive. We know its har...

Automatically Insert Adsense Ads Inside Post In Blogger Blogs

Automatically Insert Adsense Ads Inside Post In Blogger Blogs

Today we will learn Automatically Insert Adsense Ads Inside Post In Blogger Blogs. Adsense is the most popular and trusted way to earn money through blogging. You can put ads almost anywhere in your blog but the most profitable area is the post, because that is the area where most of your readers and visitors are interested in. almost 88% of the search, referral, social and direct traffic comes there.
So placing an ad inside post will probably generate more income than any other place. But unfortunately you can't place ads inside post, blogger doesn't have this feature in the settings, so we came up with a tweak which will allow you to put your desired ad code or adsense code below 1st., 2nd and later paragraphs. without wasting any time lets start the tutorial.  

Automatically Insert Adsense Ads Inside Post In Blogger Blogs

This is and advance method and requires some coding knowledge, You have to be familiar the working process of blogger's HTML editor to follow this method. if you follow this method you can add css to your blog very easily.

Before Editing we recommend you to make a backup of your template, so that anything goes wrong you still have your blog design safe.

How to add css in blogger or blogspot blogs

The First thing you need to do is to login into your Blogger account and go to >> Templates >> Edit HTML and search for the ending <data:post.body/>.

Note: you may find it several times, but we need to stop at the second one. Or, if you can't see any changes, test the third one.

After you get the code just replace it with below code.

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

<div id='adsense-target'><data:post.body/></div>

<script type='text/javascript'>
function insertAfter(addition,target) {
var parent = target.parentNode;
if (parent.lastChild == target) {
parent.appendChild(addition); 
} else {
parent.insertBefore(addition,target.nextSibling);
}
}
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){
insertAfter(adscont,linebreak[0]);
}
</script>


  1. ADSENSE CODE HERE Replace this text with your adsense code, but before replacing you have to convert the code with special tool, convert your adsense code by going to this tool- Adsense Ads Converter.
  2. adscont,linebreak[0] To insert the ad after the second paragraph, change "0" from the line in red with "2".
Now save your template by clicking the Save button.

Conclusion

Congrats !! You have made it. now you have learned that Automatically Insert Adsense Ads Inside Post In Blogger Blogs. Visit your blog and check the awesome customization live in action, hope you liked this tutorial, if you enjoyed then please share it with your friends, we are working hard to develop more such awesome widgets please stay tuned with Us. kveðja !! (Goodbye in Icelandic!! hahaha).
A special thanks to Helplogger for the above code.
Automatically Insert Adsense Ads Inside Post In Blogger Blogs Automatically Insert Adsense Ads Inside Post In Blogger Blogs Reviewed by TemplatesYard on August 13, 2017 Rating: 5

38 comments:

  1. bhout he acchi jankari sir pls visit my blog www.subtechguide.com

    ReplyDelete
  2. Example for liberty template.
    Dont have .

    ReplyDelete
    Replies
    1. Will you be more specific about the issue.

      Delete
  3. mero kooo help karo toh sahi

    ReplyDelete
  4. i put it in my blog https://indiancookingmaster.blogspot.in/ but showing up. what could do?

    ReplyDelete
    Replies
    1. We can't see the codes in your page source, make suye you have placed the codes in right place.

      Delete
  5. i put the code in my site www.thinktwice.tk for approval but i dont think i pasted it in the right place.. pls. help..

    ReplyDelete
    Replies
    1. We can't see the codes in your page source, make sure you have placed the codes in right place.

      Delete
  6. thank you sora, ads have managed to show, but what if add more than one advertisement in article

    ReplyDelete
  7. tanks man.i falow your example.i dont have error ,and....
    how do I check if it works?

    ReplyDelete
  8. I have tried it and it only worked on the third tag, but since i have added it already, can i add another one? the previous one i added was in linebreak 4, how can i add another one in linebreak 7?

    ReplyDelete
    Replies
    1. Currently it only supports one ad at a time.

      Delete
  9. It works. Thanks, but how do I insert ads below the title of the blog post?

    ReplyDelete
  10. There is a problem with the labels pages
    I think this line of adsense code

    (adsbygoogle = window.adsbygoogle || []).push({});

    Show up before the post description !!!
    I tried in various ways to hide him but to no avail

    An example illustrates the problem

    ReplyDelete
    Replies
    1. We have already mentioned that you have to convert the code before adding.

      Delete
  11. I'm already buy optima premium template..i'm try to put true ads adsense before close head code but true ads is not working. And also please give tutorial how to put ads code below content.

    ReplyDelete
  12. I have started a blog on google blogger, in future i want to apply to google adsense. If i install sora one blogger templats now, then does google adsense will give me approval in future? Or it give approval in templats avalable in google blogger? PLEASE HELP ME.

    ReplyDelete
    Replies
    1. Our templates are ads ready and you will get approval by using our templates.

      Delete
  13. Thanks it worked perfectly. The ad is displayed below first paragraph of the post. Now expecting a tutorial to display one ad unit at the bottom of the post too!

    ReplyDelete
  14. I appreciate the tutorial and it works perfectly. It worked with my template's third element. However, this post needs to be updated as parsing the adsense code before adding is no longer needed.

    Jameslads.blogspot.com

    ReplyDelete
  15. Hello,

    Does this work with the Adsense Auto Ad Script ?

    ReplyDelete
    Replies
    1. This script is based on old ad formats but still you can give it a try.

      Delete
  16. As I am using Sora Template, it was better for me to use this code. It worked at the last datapostbody.

    ReplyDelete
    Replies
    1. You will see multiple codes, pls chk carefully

      Delete
  17. can i add ads multiple time in one post with this code. please help i want to show ads on after every two paragraph.

    ReplyDelete
    Replies
    1. Yes you can, but both the ads will appear at the same place.

      Delete
  18. Please Update This Post We Want 2 Ads On Post Middle.

    ReplyDelete
    Replies
    1. Follow this blog, we will post new version very soon.

      Delete
  19. Hello. This is Sunny. Currently I am using https://lily-soratemplates.blogspot.com/. May I know whether this template can insert Adsense ads? If yes, is it the same way as this post mentioned?

    My blog: https://sunnyidea-balkan.blogspot.com/

    ReplyDelete
  20. I have superfast template, when i put adsence ads in header or between post dose not work proprly,
    For header ads in mobile mode don't take the specific dimension
    And between post dose not display in desktop or moblie mode

    ReplyDelete
    Replies
    1. Don't create dynamic ads, instead create ads for specific places and sizes.

      Delete

Note : -We have stopped giving support to free version users, please read this article Making Blogger Professional, Important Updates !!. If You Are Facing Any Problem While Setting Up The Free Theme, Then We Recommend You To Read Our FAQ(Frequently Asked Question) Page.