In a previous post we saw how and where we can add adsense post in the blogger.However this method work with only predetermined fixed locations.But what when you want to display adsense ads in middle of the posts or anywhere in the post like,below titles,end of titles,post footer etc.Its very easy just follow the steps below and you can add adsense ads inside blogger post.
*Before proceeding for any customization first you need to back up your template(go to template>click on the backup/restore).
1st Step. First we need to parse the adsense code then go to template and click on edit html button and now click anywhere inside your code area and find this code by using CTRL+F keys.
<data:post.body/>
Note:you may find it several times,but we need to stop at the second one if it's not work then go for the third one,Look below for example.
2nd Step. Replace <data:post.body/> tag with this code.
<div expr:id='"adsmiddle1" + data:post.id'></div>
<b:if cond='data:blog.pageType == "item"'>
<b:if cond='data:blog.pageType != "static_page"'>
<div style="clear:both; margin:10px 0">
<!-- Add here your Adsense Code -->
</div>
</b:if>
</b:if>
<div expr:id='"adsmiddle2" + data:post.id'>
<data:post.body/>
</div>
<script type="text/javascript">
var obj0=document.getElementById("adsmiddle1<data:post.id/>");
var obj1=document.getElementById("adsmiddle2<data:post.id/>");
var s=obj1.innerHTML;
var r=s.search(/\x3C!-- adsense --\x3E/igm);
if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}
</script>
3rd Step. Put your converted Adsense Code where you see <!-- Add here your Adsense Code --> annotation and after that save your template for changes.
For Centering your code adsense ads,add the Center tag before and after your adsense code example:
<div style="clear:both; margin:10px 0">
<center>
<!-- Add here the code of your ad -->
</center>
</div>
4th Step. Now when you create a new post,add this html tag inside your post where you want to display your adsense ads
<!-- adsense -->Example:
<div> demo text. demo text. demo text. demo text. demo text. demo text. demo text. demo text. demo text. demo text.</div>
<!-- adsense --><div> demo text. demo text. demo text. demo text. demo text. demo text. demo text. demo text. demo text. demo text.</div>
Note:By default from this trick of add adsense ads anywhere inside the blogger post will be visible below post title unless you will not apply this html tag <!-- adsense --> inside your blogger post when your create it.