Multiply your Social Media Traffic 100% Free!
Powered by MaxBlogPress  

How to add AdSense Code to the middle of every Blog Post within 5 minutes, automatically!

inline_wraptop Today I’ll be posting a step by step guy on how to add Inline AdSense code to the middle of your blog posts. Not only AdSense, but you can use this for Yahoo! Publisher Network ads, Bidvertiser and etc. We’ll be going through all the details and utilizing a plugin, and a simple theme hack to complete the trick which will add AdSense block within all your blog posts, published already and to be be published.

But, first of all, why would you want to add inline AdSense Code? Because that improves your AdSense Ad block visibility. You blog post will wrap around the Inline AdSense slot, so that’ll make sure a good number of your visitors reading the post will ultimately see the Ad - instantly boosting your AdSense CTR…

Ready? Here we go… We will insert a blog of AdSense code to everyone of your posts, making the post wrap around the block, to the top left corner. (I’ll show you how to customize this later in the post)

The Method - Adding AdSense code

1. Copy your AdSense code and keep it in the clipboard.

2. Open your wordpress theme editor and open the Single Post Template (single.php) or whichever the template file for your Single Posts. (We’ll add AdSense only to the individual posts)

How to add Inline AdSense Code to every Blog Post

3. Then find the line of code which says:

<?php the_content(’Read the rest of this entry &raquo;’); ?>

4. Got it? Awesome! Now, right before this code, insert a new line and type out the following coding. Replace <your AdSense code here> with your AdSense code. (A screen shot is given below)

<div style=”float:left;”><your AdSense code here></div>

How to add Inline AdSense Code to every Blog Post

5. Update your theme changes! And you’re done with adding the AdSense code.

Now, you must be able to see an AdSense code being placed Inline with all your posts to the top left corner.

How to customize the position?

Simple. First, you must understand a few things.

One, the php code you hunted down: “<?php the_content(’Read the rest of this entry &raquo;’); ?>” - resembles the function which will call your blog posts’ text. Not the header, just the text and the body content i.e. Images and etc. So, if you insert the AdSense code after this line, unlike the previous example, you should see the AdSense block after each post.

Two, in the Div Container code: “<div style=”float:left;”><your AdSense code here></div>” - “float: left;” means that you’d align the AdSense block to the left of the post. To make it align to the opposite end, just replace it with “float: right;”.

So, there you go. I hope you’ll find this useful. If there’s anything you’d like to know or clarify, just shoot me a message.

Subscribe to ROCKFUSE
or...

Related Posts

  1. no image1stAngel (Who am I?) posted the following on August 3, 2008 at 12:52 am.

    It isnt working :( http://ourgym.co.uk I put it in exactly as you said but nothing shows, not even a gap :(

    Rate this:
    2.0
    Reply to 1stAngel
    1. no imageNadeesha Cabral (Who am I?) posted the following on August 3, 2008 at 3:13 am.

      Hmmm.. That is very unlikely. I’m sure this should work since I followed the exact same steps for one of my other blogs yesterday. Are you using any cache plugins on our gym?

      Rate this:
      3.2
      Reply to Nadeesha Cabral


  2. no imageMuneeb (Who am I?) posted the following on August 3, 2008 at 2:41 am.

    Wow !!! I never thought about this :)
    Thanks for sharing .. that will surely can increase potential of earnings via adsense ..

    Cheers

    Rate this:
    3.1
    Reply to Muneeb

  3. no image1stAngel (Who am I?) posted the following on August 3, 2008 at 3:35 am.

    I don’t know if I am or not. I am going to test it again…. may even be the server cache

    Rate this:
    2.0
    Reply to 1stAngel
    1. no image1stAngel (Who am I?) posted the following on August 3, 2008 at 3:38 am.

      No, tested and it definitely isnt showing :( I would love this but I think Im not having it LOL

      Rate this:
      2.0
      Reply to 1stAngel
      1. no imageNadeesha Cabral (Who am I?) posted the following on August 3, 2008 at 4:14 am.

        Hmm.. Can’t think of a logical reason as to why. If you can send me the edited single.php file I can take a look.

        Rate this:
        3.2
        Reply to Nadeesha Cabral



  4. no imageSandarenu (Who am I?) posted the following on August 3, 2008 at 7:48 am.

    I heard somewhere that Google only allow 3 AdSense blocks per page. Is that what causing you this problem?

    Rate this:
    2.2
    Reply to Sandarenu
    1. no imageNadeesha Cabral (Who am I?) posted the following on August 3, 2008 at 10:56 am.

      Yes, that’s true. AdSense only allows three blocks per page. But this was a simple misplacement in her file. And it works fine for her now.

      Rate this:
      3.5 (1 person)
      Reply to Nadeesha Cabral


  5. no imagebonoriau (Who am I?) posted the following on August 4, 2008 at 12:28 am.

    Thanks for the very informative tips…I always wondering how the other blogger position the adsense in the middle of posting.

    Rate this:
    3.2
    Reply to bonoriau

  6. no imageShireishou (Who am I?) posted the following on August 4, 2008 at 7:02 am.

    Ah.. .I wish I know this tutorial before getting depress managing my Single.php code.wahaha U did amazing jobs in writing tutorial.I already able to put the adsense code at my post. But since I use small view to post, I put it on top ^^

    Rate this:
    3.5
    Reply to Shireishou

  7. no imageNihar (Who am I?) posted the following on August 4, 2008 at 2:11 pm.

    I knew this tip from long time. was also using it when i was using blogger platform… But it is a very important thing to do if you want to get good CTR Rate.

    Rate this:
    3.2
    Reply to Nihar

  8. no imageSunil Pathak (Who am I?) posted the following on August 5, 2008 at 4:10 pm.

    Hi Nadeesha
    thanx for the great tips i am not using any advertising service at the moment on my blog
    but i will surely use your trick when i use one :D

    Rate this:
    3.4
    Reply to Sunil Pathak

  9. no imageIvi (Who am I?) posted the following on October 4, 2008 at 9:27 pm.

    What if I want to align it in the middle of the post. Not in the beginning, not end.

    Rate this:
    2.8 (1 person)
    Reply to Ivi

  10. no imageJayen (Who am I?) posted the following on November 17, 2008 at 12:47 pm.

    Hey that’s great, but what about actually adding it to the middle of the post ;) EI Half way down the text of the post? I’d like to try adding an extra adsense bloc their :twisted:

    DO you have to create various loops or something?

    Thanks

    Jayen

    Rate this:
    2.9 (2 people)
    Reply to Jayen
    1. no imageNadeesha Cabral (Who am I?) posted the following on November 17, 2008 at 8:26 pm.

      Hmm.. the easiest way to do that is to develop a plugin that insert adsense code automatically after a X number of words, breaking the paragraphs..

      Rate this:
      3.6 (1 person)
      Reply to Nadeesha Cabral
      1. no imageJayen (Who am I?) posted the following on November 23, 2008 at 7:25 am.

        I’ve been looking for a plugin for it but so far no luck :|

        Still for now i applied your method, i had to learn a little CSS to get it to wrap around the text thou, i ended up editing it like this:

        That works well :P Now to tidy it up and put it in my style sheet.

        Thanks for the post, i’ve sub to your feed :) i’d been meaning to figure out how to do this for a while.

        Jayen

        Rate this:
        2.2
        Reply to Jayen




Leave a reply

:mrgreen: :| :twisted: :arrow: 8O :) :? 8) :evil: :D :idea: :oops: :P :roll: ;) :cry: :o :lol: :x :( :!: :?:

  1. You will post the following soon.
    Go ahead and start typing.