How to Set up Google Adsense on WordPress

This month earlier, Google has announced they are deprecating the Google Adsense official plugin from WordPress.

That’s a bad news for everyone using it, since it’s really handy for people who don’t know codes and it’s easy with its visualized interface.

I have searched pretty much any alternatives that can compare with it – WP QUADSGoogle AdSense by BestWebSoftEasy Plugin for AdSenseAd Inserter, Advanced Ads etc. But none of these has the visualized interface as Google and they will charge you if you want fancy features, such as, adding an ad at the header.

Basically, on codes side, you can put an ad wherever you want as long as you know where the code of desired position is. That would require some digging work, but not too hard.

And, alternatively, you can use the widget option inside WordPress itself. Text Widget can give you the ability to insert ad codes in it, once you insert the ad will automatically appear on your widget area.

This could combine with page builders to insert text widgets in your pages, posts and other places. Genius right?


As for now, Google recommends either manually insert ad codes like above, or use their QuickStart ad codes to do it once for all.

QuickStart is a new ad adding option that it automatically calculates your website and would put optimal ads(Maximum 3 and it won’t cover your site’s content) on it. Fully automatic so once you have set up the desired options in QuickStart then you can lay down your back and enjoy the view.

Here, let’s see how to add QuickStart onto your website.

  1. Get into your Adsense account, navigate to My ads -> Content -> Page-level ads adsense
  2. Here, there are 3 options for you, one for desktop, and the other two for mobile. Enable the desktop one. Anchor/overlay ads means the ads that will show up on your mobile browser with a lower small rectangle ad covered the page. Vignette ads means every time you enter a new page there is an interval ad will show up on your browser, you need to click it to skip or open the ad. I personally prefer the Vignette ads, so I turn off the Anchor/overlay ads. adsense
  3. Get the code.
    adsense quickstart
  4. Copy the code inside the box. ad3
  5. Open up your WordPress admin panel, go to Appearance -> Editor. Find header.php. 
  6. Add the code between and <head> and </head>
    adsense quickstart
    Then you are done! Beware, QuickStart does not give control over the positions of ads, so if you want ads to appear at your desired locations then you need to manually insert them.

After the setup, you can use your mobile phone and go to to test out whether the mobile ads are working on your site. It’s pretty handy.

And since it’s WordPress, any change made in the php could override the whole site, so you don’t need to add it one by one to all pages.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.