Place Your Ads Here 460x68 ads

show ads at the start and end of posts blogger



To show adsense and other ad codes in either of the sidebars or footers or easy but to get visitors attraction these codes must be also in the content area of your (i,e) the post section. Here we are about to see how to put ads not only at the top and bottom of the post but also in the middle of the posts.








Step 1:  save the template and just expand widgets and search for <data:post.body/> and paste the code right above and below the code as shown below


 <!-- adsense or anyother ad code -->

    <data:post.body/>

    <!-- adsense or anyother ad code-->




Step 2:  To display ads between each posts , again search for <data:post.body/>

and paste these codes along with your ad code

    <div expr:id='"aim1" + data:post.id'></div>

    <div style="clear:both; margin:10px 0">

    <!-- adsense or anyother ad code-->

    </div>

    <div expr:id='"aim2" + data:post.id'>

    <data:post.body/>

    </div>

    <script type="text/javascript">

    var obj0=document.getElementById("aim1<data:post.id/>");

    var obj1=document.getElementById("aim2<data:post.id/>");

    var s=obj1.innerHTML;

    var r=s.search(/\x3C!-- adsense --\x3E/igm);

    if(r>0) {obj0.innerHTML=s.substr(0,r);

    obj1.innerHTML=s.substr(r+16);}

    </script>


Remember, before you paste your adcode in edit html section please make sure that
 you have changed these </> into &lt; and &gt;

THATS IT.....



Sameera ChathurangaAbout Author Shoyab Khan

Blogger, MAC user, Apple Fan, Online Content Writer, Designer, Gamer, Programmer and Jovial Guy!. Like my Facebook Fan Page. Catch me on Twitter and Google+. Read more about Me and Www. Only4Everyone.Blogspot.com. Download Free Games,Download Free Software,Download Movies and Watch Online,Blogger Wordpress and Website Tips , Tricks ,Widgets,Templets, and many other Sources and Health Tips,Photo Gallery contact me

Thank You

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...