How to insert Adsense code inside body post in blogger | KhmerueTeams Official

How to insert Adsense code inside body post in blogger

 To add adsense in blogger body post you need to know two things about your themes, so the question what is the theme version in your blogger? 



-If you are using older version of blogger theme you will this code : 

1. <div class='post-header'>

2. <div class='post-header-line-1/>

But if you are using new themes in 2021 or 2022 you will see this code as shown below: 

3. <data:post.body/>

So the three code above is the same code but it's wrong version of the years in html coding. if you see the 3 code above, this means you are go to the right way of place the ad-sense code in blogger body post.

Step to add Adsense code! for older version themes.

When you see these both code stay in the same place up and down. So don't need to do or edit anythings. Go ahead and past your adsense code between this two code and you are done! 

Example: <div class='post-header'> ...Your Ads is Here... <div class='post-header-line-1/>

Step to add Adsense code! for newer version thems.

Please go ahead and search this code below:

3. <data:post.body/>  
So you need to replace it with these code as shown below.

<b:if cond='data:view.isPost'>
<div id='seoneurons-target'>
 <data:post.body/>
</div>
<div id='seoneurons-content'>
<div style='margin:15px 0;text-align:center;clear:both;'>
      <!--Place Your Prased Adsense Ad code here-->
</div>
 </div>
<div id='seoneurons-target'>
 <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("seoneurons-content");
var target = document.getElementById("seoneurons-target");
var linebreak = target.getElementsByTagName("br");
if (linebreak.length > 0){
insertAfter(adscont,linebreak[2]);
}
</script>

</div>
</b:if>
 <b:if cond='data:view.isPage'><data:post.body/></b:if>


And then Past your adsense code at the red text color (<!--Place Your Prased Adsense Ad code here-->)


Share on Google Plus

About KhmerueTeams Official

Welcome to KhmerueTeams Officials Blogger. I am Mr. Chhuye The Admin of this blogger. If you have quetion contact me : +855968555664 / +855976235033 or watch my video on

YOUTUBE HERE

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment