How to display google Adsense ads between all blogger posts

By showing your Adsense ads between all blogger posts you can get more views on your ads. and in this post, I will provide you information about How to display google Adsense ads between all blogger posts. by applying following steps you can show google Adsense ads between all blogger posts. ads will appear after the first paragraph. so first of all go to Adsense and copy your ad unit code. show AdSense ads between all the posts blogger.
How to display google Adsense ads between all blogger posts
go to blogger.com and log in your account. select your blog in that blog you are going to showing ads between all blogger posts. from your blog dashboard click on template.
How to display google Adsense ads between all blogger posts
in next page, you will see your current template preview. And two buttons one is customized and second is EDIT HTML click on edit HTML button.
How to display google Adsense ads between all blogger posts
Your template code will be displayed in the text box. click anywhere on the code and search the following code by pressing ctrl+f. <data:post.body/>
How to display google Adsense ads between all blogger posts
maybe there are more   <data:post.body/> tag located in your template code. but we need to find <data:post.body/> that is near <div class='post-body entry-content' expr:id='&quot;post-body-&quot; + data:post.id' itemprop='articleBody'>.
How to display google Adsense ads between all blogger posts
  after found the <data:post.body/> just replace it with the following code.
<b:if cond='data:blog.pageType == &quot;item&quot;'> <div id='adsense-content' style='display:block;text-align: center'>YOUR ADS CODE HERE</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>
Note: Replace YOUR ADS CODE HERE with your AdSense code 
  How to customize?
with the above code, your ads will appear below the first paragraph only. but if you want to show ads after the second paragraph you can do it by replacing 0 to 1. in the above code 0 is marked with red color. just replace it wit 1 to show your ads after the second paragraph.
that's it now visit your blog posts the ads are displaying between all blogger posts. if you get any error you can ask me here by dropping your comments bellow.

Post a Comment

0 Comments