Wednesday, November 20, 2024
₹0.00

No products in the cart.

0
HomeTime-lineHow to set up automatic ads on Blogger for every post

How to set up automatic ads on Blogger for every post

Are you looking to monetize your Blogger website and increase your earnings? then Setting up automatic ads on Blogger posts that is a great way to achieve this. so you have to come to the right place Today in this article I will share it with you how to set up automatic ads on Blogger for every post.

How to set up automatic ads on Blogger post

  • First, login your Blogger account and go to the themes section, then click edit HTML.
  • Now you have to successfully enter the blogger theme edit section.
  • so here the find your theme body tag code <data:post.body/>
01
<div id='jobmiddlenew'> 
<data:post.body/> </div> 
<b:if cond='data:blog.pageType == &quot;item&quot;'> 
<style> #addcodemiddle{display: none;} </style> 
<div id='addcodemiddle'> Place Your Ad Code Here </div> 
<script type='text/javascript'> var str1=document.getElementById(&quot;jobmiddlenew&quot;).innerHTML; var str2=str1.length; var str3=str2/2; var substr = str1.substring(str3, str2); var n = substr.search(&quot;&lt;br&gt;&quot;); if(n&lt;0) { n = substr.indexOf('.'); if(n&lt;0) { n=0; } var firsthalf = str1.substring(0, str3+n+1); var secondhalf = str1.substring(str3+n+1, str2); } else { var firsthalf = str1.substring(0, str3+n+4); var secondhalf = str1.substring(str3+n+4, str2); } var addcode=&quot;<center>&quot;+document.getElementById(&quot;addcodemiddle&quot;).innerHTML+&quot;</center><br/>&quot;; var newbody=firsthalf+addcode+secondhalf; var strnew=document.getElementsByClassName(&quot;post-body entry-content&quot;); strnew[0].innerHTML=newbody; document.getElementById(&quot;addcodemiddle&quot;).innerHTML=&quot;&quot;; </script> 
</b:if>
  • Copy the Above Code and Paste it into Notepad or any text editor application.
  • Open the Google Adsense Account
  • Generate Adsense Ads or any ads(Text and Image) code
  • Replace line <!–Place Your Ad Code Here–> with the Adsense code.
  • Now Open blogger.com and select “Theme”.
  • Download the theme file for backup.
  • And Now paste the code below <data:post.body/>.
How to set up automatic ads on Blogger for every post
Paste the edit code

Now your blogger every post ads code place automatically, If you find the above article helpful or have any doubt, ask in the comment section below. We’ll be happy to help you. Thank you.

Can we use AdSense in Blogspot?

yes, you can use google AdSense in blogger blogspot.

Follow Me On Social Media

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Populer