How To Add Google Adsense to WordPress

How To Add Google Adsense to Wordpress

In a Hurry? Click Here to Download the PDF Version

If I had a nickel for every time someone asked me how to add Google Adsense to WordPress, I would have a lot of nickels. 😉

So this is a pretty elementary topic, but we will go ahead and cover it for those who need it. First, you have to head over to and sign up for an account. It may take a few days before you get approved as they are cautious about who is allowed into the program.

After you are approved into the Adsense program, then go login and after you have logged in you can click the “My Ads” tab shown below.

how to add Adsense

Next, click “New Ad Unit” as seen below…

adding a new ad unit in adsense

Now you can begin creating your ad. Pick a name and size, if you aren’t sure about the sizes, you can see all of the adsense sizes and find which one works best. Typically 160×600 work well for those with skinny sidebars and 300×250 will fit in the sidebar for those with wider sidebars.

I recommend creating a custom channel for each ad, this way you will be able to track the performance of each individual ad unit. You will likely find that certain placements and positions on your site yield dramatically different earnings, so being able to see which ones deliver is quite helpful. I typically name mine something like “BYP 728×90 Header” or “BYP 160×60 Right Sidebar”.

adding adsense to a wordpress blog

After you have your ad all set up just click “Save and Get Code”. Now it will take you to a page with some HTML for you to copy. Use CTRL-C to copy it and we will get it added to WordPress.

How to Add Google Adsense to WordPress

Start by logging into your Admin panel of your blog. Once in, click on “Widgets” under the Appearance section on the left-hand side. (As seen in the image to the right).

Now you will see the Widget page and you are going to want to add a text-widget to one of the sidebars. You can do this simply by dragging a Text widget over to the sidebar widget that you want the ad to show up on.

adding adsense to a text widget

Once you have moved the text widget over to the Sidebar area, you can click on the down arrow on the right side of the text widget to open it up.

Once you do, you will see a couple of blank fields like this…

adding wordpress text widget

Now, just drop your pasted Adsense HTML code into the big box. Press save and you are done! You can now drag this widget above or below other sidebar widgets to adjust the placement of it on the sidebar. Also, be aware that it often takes up to 10 minutes before your Adsense Ads begin to show up.

How do I get the Adsense ads other places than the sidebar?

I know of two ways:

  1. Manually editing WordPress PHP files to insert them in the desired locations (this is what programmers do).
  2. Use the Thesis WordPress Theme. If you use this theme with the Openhook plugin you will have about 50 different locations on your site where you can drop code just like we did above, to get your ads wherever you want them – header, footer, before content, after content, etc (this is what non-programmers do).
BONUS: Want to launch your own profit-generating blog? Take our Free 7-Day Launch Your Blog Challenge! After seven days, you’ll have a fully optimized, ready-to-go, traffic generating blog! Click here to start the challenge today!

    +Bob has been blogging since 2007 and earning a full time living from his blogs since early 2009. He enjoys fine dark chocolate, learning, foosball, loose-leaf tea, helping people succeed, anything God created, playing guitar, taking the scenic route, Philippians, and Chick-Fil-A.

    • Judah LaBrie

      thank you for all the helpful information, awesome to see you doing what you love! -judah

      • jmilligan

        Thanks! We are blessed for sure.

    • wanda

      thank God I found you. I was about to loose my mind. lol.

      • jmilligan

        Awesome glad you got it to work.

    • Shannon

      Oh, thank you thank you! BUT, next question…after you have placed said ad, lets say before your header….how do you get in centered?

      • jmilligan

        you can use an old center tag in html i looks like this without the spaces your adsense code

    • Mike

      I am having trouble getting the text widget to stay in place once I drag it. What am I doing wrong?

      • Bob

        Mike, try a different browser and see if that helps

    • Ann

      I tried several times to save the code in the “Text/HTML” widget. It won’t save! Don’t know what I’m doing wrong?

      • jmilligan

        Try a different internet browser. See if that helps

    • psq4

      hi bob,

      I tried pasting the codes from adsense to my main sidebar (theme:Tarski) but the code disappeared after I clicked on ‘Save’.

      What went wrong ?

      • jmilligan

        This can happen for many reasons. I would try using a different internet browser and see if it works.


      Where on my blod do I put the AdSense privacy policy? Do I add an actual page specifically for it?

      • Anonymous

        I like to use the easy privacy policy wordpress plugin. It will create a page for you. You just have to fill in some of your details. Jonathan


          thanks for the quick reply jonathan!

    • Arminah7

      Do you have an article about adding widget ready side bar?

      • jmilligan

        Not sure what you are referring to exactly. Can you be more specific?

    • Angel Hagner


      love the way you write and also the theme on your blog. Did you code this yourself or was it done by a professional? I’m very very impressed.

      Prep Station

    • jmilligan

      Awesome, glad it helped!

    • jmilligan

      Sorry for the delay. Did you ever figure this out?

    • Archurst

      Thanks man! i really enjoyed it

    • corto

      Good morning

      I do have my own domain blog and recently i made an Adsense account. I`ve tried so many times, to add the html code, as you said, to the widget area, but nothing appears. Can you please help me?

      • BloggingYourPassion

        Corto, last I checked this doesn’t apply to blogs, you need to have your own self-hosted WordPress blog in order to use ad networks on your blog. We have a free setup program if you are interested in switching…


      thx a lot 🙂

    • KJ

      Unfortunately, will not allow Google Adsense Advertising at all. If you upgrade to your own domain name, still hosted by WordPress, you can STILL not have Adsense, but you can have WordAds, which WordPress started earlier 2012. I hear the payout is really random and inconsistent.


      Great article and excellent walk-through on AdSense. Thank you!!

    • Anoop Bhandari

      Thank you for the post, I was able to walk through your instructions effortlessly, get the plugin set up in 5 minutes, and have my ads showing in less than 10 minutes

    • Divya Rajput

      Google AdSense i think thats really good i was used adsense injection
      but now i am using Google AdSense plugin its better Thanks for nice
      post admin


      i have approved google adsense and past like your method. but add dont show just show her border. now what can i do for that .
      thank you

    • Sheena Neil

      Thanks Bob for the easy to understand post. I now have ads on my blog, YAY!

    • Morgan

      We are sincere Government well registered and certified private moneylender permitted to render financial assistant to individual and cooperate bodies, ranging from the Amount of $5,000 to $100,000,000 Million Dollars ,Euro and Pounds with long loan repayment period of 1 year to 50 years. Loan Available now are Business, Personal, House,Travel and Student Loans. Apply for a loan today. Its Easy and fast to get at 2% interest rates and monthly installment payments. Check-out this great offer. If you are interested do get back us with these information,Your Name: Address:City:Country:Phone:Amount Needed:Loan Duration: Contact via [email protected]