How to Create AdSense code

  1. Sign in to your AdSense account.
  2. Visit the My ads tab.
  3. In the sidebar, select your product. For example, if you want to display ads on your website, select “Content“.
  4. Click +New ad unit.


  • Give your ad unit a name. It’s a good idea to use a unique, descriptive name that will help you find this ad unit later.
  • In the “Ad size” section, choose the size of the ads that you’d like to show.
    In general, wider ad units perform better.

adsense ad size

  • Select which type of ads you’d like to show on your pages from the Ad type drop-down. We highly recommend that you display both text and display ads.

adsense ad type

  • By displaying more ad types, you can earn more revenue.
  • Click Save and get code.


  • In the “Ad code” box that opens:
    Leave the code type set to “Asynchronous” (the default), unless you want to use synchronous ad code.
    If you’ve chosen to create a responsive ad unit, you won’t see the Code type drop-down in the “Ad code” box. Responsive ad units only use asynchronous ad code.
  • Select the ad code by clicking it. You’ll see the ad code highlighted in blue.Example of the “Ad code” box
    adsense ad codeCopy all of the ad code, e.g., press Ctrl+C (Windows) or ⌘+C (Mac) and paste it into the WP QUADS ad code form:


After doing this you just need to activate this ad.

You need to do this on the tab General & Position:

You are done.

Go to the frontpage, look at a post and see the ad appearing!