Skip to main content

How to Display Adsense Ads After First Paragraph - Blogger

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 - 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 == &quot;item&quot;'>
<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(&quot;adsense-content&quot;);
var target = document.getElementById(&quot;adsense-target&quot;);
var linebreak = target.getElementsByTagName(&quot;br&quot;);
if (linebreak.length &gt; 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 == &quot;item&quot;'>
<div id='adsense-content' style="display:block;text-align: center">
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- FCT Resposnsive Link Ads --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:block&quot;
     data-ad-client=&quot;ca-pub-****************&quot;
     data-ad-slot=&quot;3789519244&quot;
     data-ad-format=&quot;link&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;</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(&quot;adsense-content&quot;);
var target = document.getElementById(&quot;adsense-target&quot;);
var linebreak = target.getElementsByTagName(&quot;br&quot;);
if (linebreak.length &gt; 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.

Comments

Popular posts from this blog

New CSC Banner Download available in PSD format(December 2022)

Dear VLE, Ministry has approved new Common Branding  format for CSC Center in category wise. There are three types of designs: 1. First one is for CSCs providing general services, and which do not provide UCL or BC service. 2. Second one is for CSCs that provide both BC and UCL services. 3. Third one is for CSCs that provide BC services along with other services. All VLES are to install one of these branding boards at their CSC depending on the services provided.   3 CSC banner design download PSD file - free computer tricks Links to the Designs: Generic CSC Centre Banner:- Generic CSC Centre Banner sample Download  Generic CSC Centre Banner PSD format from the below link Generic CSC Centre Banner || Download Here BC+UCL Centre Banner:- BC+UCL Centre Banner sample Download  BC+UCL Centre Banner PSD format from the below link BC+UCL Centre Banner || Download Here BC Centre Banner:- BC Centre Banner sample Download  BC Centre Banner PSD format from t...

Realme Narzo 30 Pro 5G price in India and specifications

Realme Narzo 30 Pro 5G price in India and specifications Specifications Details Display 6.5-inch FHD+ IPS LCD display with 1080 x 2400 pixel resolution, 120Hz refresh rate Processor MediaTek Dimensity 800U 5G processor RAM 6GB/8GB LPDDR4x RAM Storage 64GB/128GB UFS 2.1 internal storage, expandable up to 256GB via microSD card Rear Camera Triple-camera setup with 48MP primary sensor, 8MP ultra-wide-angle lens, and 2MP macro lens Front Camera 16MP selfie camera Battery 5000mAh battery with 30W Dart Charge support Operating System Android 10 with Realme UI Connectivity Dual-SIM 5G, 4G LTE, Wi-Fi, Bluetooth 5.1, GPS, USB Type-C Other Features Side-mounted fingerprint scanner, 3.5mm headphone jack Price (As of my knowle...

Sky HD Image Download - Free Compute Tricks

Here you can download HD nature images and below is sky image for you. To download the image just click on it and download the image by clicking on "save image as". Thank you sky HD image nature village sky HD image download free download