Header Ads

how to put ads in articles and not between for blogger (WORKING)

adding ads in and between articles will increase you CTR, which will increase your earnings, but you might know that blogger don't put ads between articles natively, but in this article i will show you how to do that.

how to put ads in article for blogger:

firstly you need to find <data:post.body/> that execute the article in your theme, in new themes there is 2 or 3 of them, sometimes it's the the number 3 like in my theme, you need to test them all until you find the right one
 then replace it with this, and change <!-- put your ad script here--> with your ad banner script

  <!-- here ads btw posts-->
  <div id="PostBody">

<div id="AdCode">
<div style='margin:5px 0;text-align:center;clear:both;'>
<!-- put your ad script here-->

<b:if cond='data:blog.pageType == &quot;item&quot;'>
 $AdCode = $("#AdCode").html();
 $("#PostBody br:lt(1)").replaceWith($AdCode);
 $("#PostBody br:lt(2)").replaceWith($AdCode);

this java script code works by replacing break code <br/> in your articles by the ad code, and replace the <br/> with css clear:both; , and she will do that 2 times in the article and one above and other in the last, you can change the number of <br/> by changing the 1 in

$("#PostBody br:lt(1)").replaceWith($AdCode);

 or you can delete one of them to make the script do it just once, you can also add other one.

the final result will be like this


No comments: