How To Add Ad Codes In Middle Of Post On Blogger New Themes

Are you currently using the blogger new themes and you will love to have Google ads or any other ad network’s banner to appear in the middle of your blog posts? If yes, then this post is just for you.

Adding ads in the middle of the post can increase your click-through-rate (CTR) irrespective of the adverts, whether PPC or affiliate marketing.

Below is a brief tutorial on how to add ad codes in the middle of posts on blogger new themes.

==> Go to Blogger dashboard > Theme > Edit HTML

How To Add Ad Codes In Middle Of Post On Blogger New Themes

==> Search for  <data:post.body/>. There is one of such code in 3 of the themes. If you find more than one <data:post.body/> replace it with the codes below and save theme.

How To Add Ad Codes In Middle Of Post On Blogger New Themes
<b:if cond=’data:blog.pageType == &quot;item&quot;’>
<div id=’ad-target’>
 <data:post.body/>
</div>
<div id=’ad-content’>
<div style=’margin:15px 0;text-align:center;clear:both;’>
       AD CODES
</div>
 </div>
<div id=’ad-target’><blockquote class=’tr_bq’>
 <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;ad-content&quot;);
var target = document.getElementById(&quot;ad-target&quot;);
var linebreak = target.getElementsByTagName(&quot;br&quot;);
if (linebreak.length &gt; 0){
insertAfter(adscont,linebreak[1]);
}
</script>
</blockquote>
</div>
</b:if>
<b:if cond=’data:blog.pageType == &quot;static_page&quot;’><data:post.body/></b:if>
==> Go to your blog post to view. The ad will be displayed in the middle of posts on both web and mobile.
NB: The 15px is the space between your content and your ad. You can choose to adjust it but for those using AdSense for monetization, it’s a policy violation for your ads to be too close to your content. 
Replace AD CODES with your own codes.

Your ad will appear after the first line break in your post. You can adjust it by changing the number in yellow. If you follow the above steps closely, you should be able to add ads in the middle of posts on blogger new themes.

Remember to parse your ad codes before pasting inside your template.

Happy blogging!