How to put Adsense ads after first paragraph in your blog? if you are searching and want to know how to insert Adsense ads below first paragraph then you can know the complete process here. The below is the complete tutorial about how you can display ads below first paragraph on the blogspot. After insert the HTML code you can set the ads to display below first paragraph and it will automatically added to all pages of the blog.
How to Display Adsense Ads Inside Blogger Post After First Paragraph
Log in to your Blogger account then select the blog and go to "Theme" and then click on "Edit HTML" now the HTML editor will open. To show Adsense ads below first paragraph you need to edit the blogger HTML and add some extra script in it, to edit blogger HTML please follow the below steps carefully.
Note: Please Download a backup of your theme before editing HTML.
Step 1.
Login to your blogger and go to EDIT HTML and now press CTRL+F and search <data:post.body/>
Note: You will find <data:post.body/> multiple times but you need to use the second one of if you do not see any changes, test the last one.
Step 2.
Replace <data:post.body/> with <div id='adsense-target'><data:post.body/></div>
Step 3.
Now put the below code just above the <div id='adsense-target'><data:post.body/></div>
<b:if cond='data:blog.pageType == "item"'>
<div id='adsense-content' style="display:block;text-align: center">ADSENSE CODE HERE</div></b:if>
Step 4.
Now replace "ADSENSE CODE HERE" with your converted Adsense code.
Step 5.
Now put the below script just after <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("adsense-content");
var target = document.getElementById("adsense-target");
var linebreak = target.getElementsByTagName("br");
if (linebreak.length > 0){
insertAfter(adscont,linebreak[0]);
}
</script>
Your final code will look like below
------------------------------------------------------------------------------------
<b:if cond='data:blog.pageType == "item"'>
<div id='adsense-content' style="display:block;text-align: center"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- FCT Resposnsive Link Ads -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-****************"
data-ad-slot="3789519244"
data-ad-format="link"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></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("adsense-content");
var target = document.getElementById("adsense-target");
var linebreak = target.getElementsByTagName("br");
if (linebreak.length > 0){
insertAfter(adscont,linebreak[0]);
}
</script>
----------------------------------------------------------------
Step 6.
Now save the theme and check it by opening any page of the blog, it will work fine for us and hope it will help you find the best solution for putting Adsense ads below first paragraph on your blog.
How to Display Adsense Ads Inside Blogger Post After First Paragraph - Blogspot |
How to Display Adsense Ads Inside Blogger Post After First Paragraph
Log in to your Blogger account then select the blog and go to "Theme" and then click on "Edit HTML" now the HTML editor will open. To show Adsense ads below first paragraph you need to edit the blogger HTML and add some extra script in it, to edit blogger HTML please follow the below steps carefully.
Note: Please Download a backup of your theme before editing HTML.
Step 1.
Login to your blogger and go to EDIT HTML and now press CTRL+F and search <data:post.body/>
Note: You will find <data:post.body/> multiple times but you need to use the second one of if you do not see any changes, test the last one.
Step 2.
Replace <data:post.body/> with <div id='adsense-target'><data:post.body/></div>
Step 3.
Now put the below code just above the <div id='adsense-target'><data:post.body/></div>
<b:if cond='data:blog.pageType == "item"'>
<div id='adsense-content' style="display:block;text-align: center">ADSENSE CODE HERE</div></b:if>
Step 4.
Now replace "ADSENSE CODE HERE" with your converted Adsense code.
Step 5.
Now put the below script just after <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("adsense-content");
var target = document.getElementById("adsense-target");
var linebreak = target.getElementsByTagName("br");
if (linebreak.length > 0){
insertAfter(adscont,linebreak[0]);
}
</script>
Google Adsense Ads Display After First Paragraph - Blogger |
Your final code will look like below
------------------------------------------------------------------------------------
<b:if cond='data:blog.pageType == "item"'>
<div id='adsense-content' style="display:block;text-align: center"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- FCT Resposnsive Link Ads -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-****************"
data-ad-slot="3789519244"
data-ad-format="link"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></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("adsense-content");
var target = document.getElementById("adsense-target");
var linebreak = target.getElementsByTagName("br");
if (linebreak.length > 0){
insertAfter(adscont,linebreak[0]);
}
</script>
----------------------------------------------------------------
Step 6.
Now save the theme and check it by opening any page of the blog, it will work fine for us and hope it will help you find the best solution for putting Adsense ads below first paragraph on your blog.
Please Share Your Thoughts