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.
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.
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.
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/>
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='"post-body-" + data:post.id' itemprop='articleBody'>.
after found the <data:post.body/> just replace it with the following code.
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.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.
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.
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/>
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='"post-body-" + data:post.id' itemprop='articleBody'>.
<b:if cond='data:blog.pageType == "item"'> <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("adsense-content"); var target = document.getElementById("adsense-target"); var linebreak = target.getElementsByTagName("br"); if (linebreak.length > 0){ insertAfter(adscont,linebreak[0]); } </script>
Note: Replace YOUR ADS CODE HERE with your AdSense code
How to customize?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.
0 Comments