How To Add Adsense To WordPress Sidebar

How to put google adsense code and javascript to your wordpress 3 sidebar, this wordpress 3.0.1 tutorial uses Twenty Ten.

Andrew asked me about adding adsense to wordpress blog a few days ago, that was a great input.

To follow this post, your blog must be approved by Google adsense to display their clients’s advertisements.

To insert the code, it really depends on the width of your sidebar to choose the ads dimensions, as you know, adsense enables us to choose not only image, but also text even link ads code.

You can also choose “autosize”. But Twenty Ten theme’s sidebar uses 200 px, so you can also choose 200x200px ads dimension while “setting up” your ads in Google adsense web page.

There are, of course many ways to put adsense in your wordpress blog. Some people put it as “menu” bar, some make them look like thumbnails, or putting them in sidebar and footer. Twenty Ten’s footer is widgetized, it means, you can put any widgets there, including Google ads.

In this tutorial, i will show you how easily putting adsense code in your sidebar widget.

1. First, login to your Google adsense’s page, and set some ads, the dimension choose anything that suits to your sidebar’s width. (more infos, see first video)

Setting up "adsense"

2. Get the code, and copy it.

3. Log in to your wordpress blog’s dashboard, and find “appearance” and “widgets”.

Appearance tab and then Widgets.

4. Choose text widget, paste the code, and you can optionally give the title as “sponsors” for example, or just leave it empty.

Dragging text widget to sidebar

Where to paste google adsense code

5. Click “save”, and refresh your blog.

Please note that it may take a few minutes for the Google advertisements to appear in your sidebar. Be patient :) Get more traffics, more traffics = more clicks and earning. Happy earning!

Setting up Adsense video;

Share the knowledge
Share on Google+0Tweet about this on Twitter0Share on Facebook0Pin on Pinterest0Share on Reddit0Email this to someonePrint this page


  1. Ceejay says

    This is just a very useful tutorial, though am not using twenty ten. I have been browsing all night to see how to add adsense to my sidebar. Thanks

  2. Daryll says

    Good day! I just want to ask what will I do if I got 2 codes? I tried this and it worked great but when I add a new code, only one ad is showing. I’ll be waiting for your reply.


    • says

      Hi Daryll,

      Welcome to this blog.

      IT must be working, but adsense limits the usage of how many blocks you want to add.

      Example, when I wanted to add two big blocks of adsense and two of small blocks, one of them is not displayed. So I only use 2 big ones and 1 small one, so they are displayed.

      In a page, max 3 adsense will be displayed, so we must also look how many ads we already have.

      I hope this helps

      Kind regards,


  3. says

    hi, thanks for this tutorials but
    When I copy the code and paste it in the wordpress text, and press save it just disappears, I tried many times
    what is the problem ?

  4. Kim@Web Strategy says

    Hi Kim,
    I’m trying to add Adsense on my other blog not on the sidebar, I’m trying to add it under the Page Title. The problem is that none of the tutorials I found seem to work. The Page is the default landing page of my blog, so it’s Title is written this way on source code: Title of the Page Here

    Can you tell me what I’m missing?

    Kim (Yeah we almost had the same name lol )

    • says

      Hi Kim. lol yeah, we have same name :)

      I have visited your link of the comment’s website, is it the site you meant?

      If yes, I have noticed you have “sight” theme of wpshower.

      I haven’t used nor tried this theme, therefore I don’t really know the code after the page title. The best, would be, contacting the theme developer’s website?

      Can’t really tell what you are missing, since I have never used this theme, Kim.


  5. Kim@Web Strategy says

    Hi Kimi, Yeah it’s Sight theme. I was actually talking about a different blog. Is there any way I can PM you? Thanks a lot. :)

  6. says

    I am trying to use this approach on my wordpress blog fullonbaan, but it doesn’t seem to work. The adsense code in the text just gets dissapeared. Can you please help.