How to put Adsense Ads Before & After Post in Blogger
Updated on 16 May
If you want to place your AdSense ads before and after your post content in blogger you can easily do that but one question always comes into our mind how we can do that.
You don't have to worry about it because I am here today to tell you how you can place your AdSense ads before and after your post content in blogger.
Sometime our template sports that functionality to add AdSense ads before and after your post but most of blogger templates does not sport this functionality so I will tell you how you can do that.
Below are some steps that you have to follow if you want to place your AdSense ads before and after your post content.
How to place Adsense Ads before and after post in blogger.
- Go To Blogger Dashboard
- Then Gi to Theme / Template
- Click Edit HTML Button
- Now search for <data:post.body/>
- Now before and after this code you have to paste your AdSense ad code. If you have read my post how you can place lazy load AdSense ads on your blog and followed it then you have to remove JavaScript file from that AdSense code that file will be enclosed in script tags eg: <script src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script> For example in my case this is the preview how I added my AdSense AD code.
- Save Theme
To Search code in blogger Press Ctrl + F and type or paste the term to search in search bar.You will find the code above three to four times but you have to check which one suits your template in my case I found it it at last. Means that I found it at third place You can also see that it has following conditional tags.
<b:if cond='data:blog.pageType == "item"'>
<data:post.body/>
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<div class='adsense-ad'>
<ins class='adsbygoogle' data-ad-client='ca-pub-xxxxxxxxxxxxx' data-ad-format='fluid' data-ad-layout='in-article' data-ad-slot='xxxxxxx' style='display:block; text-align:center;'/>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<data:post.body/>
<div class='adsense-ad'>
<ins class='adsbygoogle' data-ad-client='ca-pub-xxxxxxxxxxxxx' data-ad-format='fluid' data-ad-layout='in-article' data-ad-slot='xxxxxxx' style='display:block; text-align:center;'/>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</b:if>
You are done now go and have a look on it.
If you visit my blog post or you can also see above and below this post you will find AdSense ADs.
0 comments for How to put Adsense Ads Before & After Post in Blogger