Infusionsoft Free Trial   Post. Hire. Done.

Building websites with Wordpress is easy until you have to start editing the code behind the website. However this is necessary in order to add AdSense code into your posts as it lines it up nicely.  This means it will automatically be added to every post you create in your Wordpress website. If you add AdSense into your templates you will not have to touch it again and the less you play with the code of your website, the better. I will show you how to add AdSense to your posts so it will line up with the text, embed itself, and look like it is meant to be there.

  1. Sign into your Wordpress Admin area.
  2. Click on the Appearance menu.
  3. Then click on Editor. See the screenshot below.
  4. appearnac-editor

  5. You will be taken to the Wordpress code editor. Click on Single.php in the right column.  See the screenshot below.
  6. appearnac-editor2

  7. When the single.php code shows up you can copy all of it and paste it to a notepad, just in case you stuff something up. This is very important. Do not move any text or even add a space where it is not meant to be. Just copy it and make a quick backup of the code. You can press in the code box and then press CTRL + A to select all. Then right click on the selection to choose copy.
  8. Ok after you have backed up this code we can now add something to it.  Look for where the content begins. The code will look something like this <div class=”postcontent”>
  9. We are going to add our code before this.
  10. Here’s the code
    • <div style=”display:block;float:left;padding:5px;”><add your adsense code here></div>        


      appearnac-editor3

Sometimes you might need to put <p> and </p> tags to make a paragraph around all of this. It really depends what Wordpress theme you are using. As you can see in the screenshot above, I have used the <p> tag. On some websites I do not have to.

When you are finished adding your AdSense code in press on the update button below the code window.

If you have backed up your code you can keep adjusting this until you get it right. Then if you can’t work it out, just paste the original code back in and press on update to save. When playing with the Wordpress code editor make sure you are not cutting code when you are meant to be copying it…Anyway you shouldn’t have to worry if you make a backup.

I am addicted to internet marketing and making money online. Who wouldn't want to live that life? I started out with one website as a hobby and now have over 20.
mitz
View all posts by mitz
s website

Related Posts

Tagged with:
 

7 Responses to “How to put adsense ads inline with your Wordpress posts”

  1. Quinn Hoffee says:

    I’ve been following your blog for 2 days now and I should tell you I get tons benefits from your post. and now how I can get news update from your website?

  2. [...] How to put adsense ads inline with your Wordpress posts [...]

  3. That is such a good resource you are offering and you’re giving it away for free. I honestly appreciate seeing sites that comprehend the value of providing a useful resource for absolutely free. I genuinely enjoyed reading through your post :) Thank you

  4. wakarima says:

    i have a blogroll account and i have reason to believe it is similar to wordpress or related but i just can’t seem to find where i can add adsense, a little help?
    wakarima´s last blog ..a list of things i hateMy ComLuv Profile

  5. mitz says:

    If it is a free wordpress blog then you cannot add adsense like this…I don’t think you can anyway, unless things have changed.. This is for people who have installed Wordpress on their own server or hosting.

  6. Alex says:

    At me this isn’t working. I don’t have the add theme option. Can you help me?

  7. kebabope says:

    Hi Mitz,
    Thank you very much for sharing,it was helpful.

    Cheers,
    Kebabope Morapedi
    kebabope´s last blog ..Attraction Marketing,Is It Worth The Trouble?My ComLuv Profile

Leave a Reply

CommentLuv Enabled