how to put adsense ads in the middle of blogger posts


Hello all on this occasion I will share how to place adsense ads in the middle of the post.

how to make google adsense income continue to increase? This question, of course, has many answers, depending on which point of view we look at.

basically google adsense income is inseparable from the layout, namely the position where the ad is placed. The location in the middle of the article is the most strategic location in advertising because it gets a lot of attention from visitors who are reading articles on the blog.

so here we will use javascript which later the ad will automatically appear in the middle of the post without destroying the content, it is important to make sure when you create an article using the <p></p> tag when creating a new paragraph , otherwise the ad will not appear . For those of you who want to try it, let's see how below.

How to Install Adsense Ads in the Middle of Blogger Posts

please go to blogger first, select it temaand edit html, copy and paste the javascript below above the code </body> if you don't find it, it may have been parsed so it will look like <!--</body>--></ body>

<b:if cond='data:view.isPost'>
!function(){let e=document.getElementsByClassName("wendy-middleAds")[0];if(e){let t=document.querySelectorAll(".post-body p"),n=parseInt(t.length/2);"P"==t[n].nodeName?t[n].parentNode.insertBefore(e,t[n]):t[n].parentNode.insertBefore(e,t[n].nextSibling)}}();

continue looking for the code <data:post.body/> usually there are more than one, you can choose the one in the conditional tag of the post page, if you don't understand, just try one - one. if you have found it, add this html code under the code <data:post.body/>

<div class='wendy-middleAds'>
<!-- Adsense ad code here -->
please replace the code <!-- adsense ad code here --> with your own ad code.

ok , that 's how to put adsense ads in the middle of blogger posts, hopefully it's useful.

Post a Comment

Previous Post Next Post



Marwat Tech

let's build a community