What's WP
Our everything is about WordPress - best choice of WordPress users!
How to Add Google AdSense Ad to WordPress Sites?

How to Add Google AdSense Ad to WordPress Sites?

google adsenseGoogle AdSense is one of the most effective tools that allow you to make money online. In this article, we just come out the detailed guidelines about how to add Google AdSense ads to WordPress sites for money generation.

In order to increase revenue, bloggers are expecting to position ads on different places of the websites, especially the attractive places that have high click-through rate (CTR). As the better design gets better CTR, we suggest adding Google AdSense ads on the right places. In general, the recommended places are:

  • Top Banner of your website(468 x60 px)
  • Sidebar (Varies from 125×125 px up to 300×250 px)
  • Content (468×60 or 300×250)

No matter where you want to place the ad on, you need to make it consistent with the website design as well as not to be intrusive for readers. In this article, we show careful steps to add Google AdSense ads to WordPress website header, menu bar, and sidebar.

Create Your Ads

In the following, let’s begin to create your ads.

  1. First of all, you need to log in the existing Google AdSense Account, or register a new one directly on the website. Note that if you register for the first time, you should wait for the verification email in about 6-8 hours, making sure that you have already passed the reviewing process.
  2. Then, click “My Ads” menu to create your own advert for the website. And then, you need to hit the New Ad Unit option. Here, you can be redirected to generate the new ads page. From this screen, you should choose the size, type and style for your advertisement. Note that you should enter the name of this ad for the internal management. As for the Ad Size option, Google AdSense gives you a lot of options for the certain situations, including the Medium Rectangle, Large Rectangle, Wide Skyscraper, Mobile Banner, Horizontal Banner, Vertical Banner, Square Banner and many more. The next selection is for the Ad Type. In the most cases, we recommend you to choose the Text & Display Ads option.

    create AdSense ad

    In addition, you also should decide the Backup Ads option. Here, you can display the blank space or showcase with your own ads when there is nothing to show. The last option is the Ad Style. By choosing the proper option, you can control the showcase of your advertisements matching your website design the most.

  3. AdSense ad display options

  4. Feel free to play around with the remainder settings, and click “Save and get code” to complete. You can copy and paste the available code into your Notepad properly for the utilization in the next step.
  5. AdSense ad code

Add Google AdSense Ads on Website Header

  • Log into WordPress dashboard, go to Appearance-> Editor and find header.php file.
  • Open and edit hearder.php file, and paste the AdSense code into the file, like the following:
  • add AdSense code to header

  • You’d better use the center tags like <center>Google AdSense Code</center> to make the ads in the center location.

Add Google AdSense Ads Under Navigation Menu

Many people also like to add Google AdSense ads under the navigation menu as it’s quite easy to mislead customers to click on ads and make huge money. If you want to use the Link Unit, then we recommend you making it look like navigation bar. You can easily make this by customize the background and text link color based on your navigation menu. Just like the following:

Link Unit AdSense

As for the Leaderboard, we suggest you use rich media ads because they are better eye-catching.

You can easily add ads by log into WordPress dashboard and go to Appearance-> Editor to find the header.php file. Then paste the AdSense code into the bottom of the file. The process is quite similar with adding AdSense ads to website header.

Add Google AdSense Ads to the Sidebar

As well, some people also place ads on the sidebar. It is also easy to manage. You can simply paste the ad code into the widget.

In the WordPress admin panel, go to Appearance -> Widgets.

wordpress widget

Click and drag a “Text widget” into the sidebar.

drag text widget

Paste the AdSense code into the widget and click the Save button to complete the process.

paste adsense code into widget

Add Google AdSense Ads using the AdSense Plugin WP QUADS Tool

The process of adding AdSense ads is not difficult for some experienced webmasters, but for newbies, this is still complicated. Luckily, there are some best WordPress plugins which can help you manage the process easily and fast. Here, we’d like to take the AdSense Plugin WP QUADS as the example.

This is a free plugin that allows you to insert and to show the AdSense ads in an easy and customized manner. Before everything, you should enter the settings page to make the following configurations.

General Settings – AdSense Code

From this part, you firstly need to navigate to the AdSense Code part to connect your generated AdSense ads with your WordPress site. Here, you can connect 10 ad options using the Google AdSense code or the plain text/HTML/JS. For the Google AdSense connection, you simply need to click the Copy/Paste AdSense Code link, paste the code you have saved in your Notepad and hit the Get Code button.

Paste AdSense Code

This way, the Ad Slot ID and the Publisher ID can be added automatically. Next, you can choose to showcase the ad in the fixed size, coming with your determined width and height. Or, you can choose the responsive option to make the ad adapt to difference screenshots and devices.

Also, you have the freedom to choose the layout, aligning your ad in the left side, right side or the center location inside your web content, along with the proper margin.

Connect AdSense Ads

General Settings – Widget Code

If you want to show your AdSense code in the sidebar, you also can choose to generate the Widget Ad. For this, you can go through the same process as you do to the AdSense Code – enter the AdSense code, choose the ads type and decide the display layout.

General Settings – Position

Now, you can go back to the General & Position part. Here, you should decide the following aspects.

  • Choose how many ads can be displayed on a single page.
  • Assign the particular or the random ad option in the beginning, the middle or the end of a post. Also, you can choose some other showcase locations, such as after the More tag, before the last paragraph and after the certain image.
  • Decide the ads visibility on homepage, categories page, archives page and the tags page.
  • Choose the post types for ad showcase.

AdSense Ads Position

Showcase the AdSense Ads

Now, you can save the settings and the specific advertisement will appear at the corresponding location with the style you determine. For the sidebar display, you need to drag your ad widget to the proper sidebar place.

Even, you can add the AdSense ad manually via the post editing screen.

Insert AdSense Ads Manually

Some Other Google AdSense WordPress Plugins

In addition to the above-mentioned option, below are some other WordPress plugins for AdSense, which are gathered to help you implement, control and overview AdSense ads with ease.



AdRotate is one of the most popular WordPress plugins for AdSense, coming with the best way to put ads on your website. It has understandable and intuitive interface, allows you to add and to manage the ads from the dashboard. AdRotate also supports unlimited groups for banners, which allows you tie certain banners to different areas of the website. Note that this plugin requires running on PHP 5.2 or higher, and compatible up to the latest WordPress 3.6 already.

best wordpress plugin for adsense - AdRotate

Quick AdSense


Quick AdSense is WordPress plugin for ads management. It is popular for the quick and flexible method to add AdSense code into a blog post. Featuring a simple page with simple configurations, it doesn’t require much coding knowledge. It provides default ads position settings. Moreover, it can also allow you to display the ads anywhere within a post randomly. It is more likely to catch attentions for regular visitors.

best wordpress plugin for adsense - AdRotate

Google AdSense Plugin

Google AdSense by BestWebSoft

Google AdSense Plugin is a professional WordPress plugin that allows Google AdSense implementation into your website. In addition to the general features that allow you to insert the ads’ code into your blog or site, it also allows you to customize them easily. Besides, you can choose to insert the ads automatically, or you can decide the place where they appear. As this plugin has been translated into 8 languages, it is welcomed by users worldwide presently.

best wordpress plugin for adsense - AdRotate

Easy AdSense

Easy Plugin for AdSense

Easy AdSense offers an easy solution to produce revenue from your website by applying Google AdSense. It has a lot of options that allow you to put links or AdSense Block in the footer or header, and display AdSense ads based on the length of the post. With flexibility and easy control, you can make money easily for your site.

best wordpress plugin for adsense - AdRotate

Ad Injection

Ad Injection

Ad Injection is a great AdSense plugin for WordPress sites. You can manage the number of ads based on the length of a post. This plugin also comes with the ability to exclude ads from blockquote, pre-sections, and custom ads exclude tags. With it, you can make money online easily.

best wordpress plugin for adsense - AdRotate


Joyce is a professional writer & SEOer who loves trying new things and sharing the experience through blogging. She loves clean design, playing with different WordPress themes, SEO, etc. Now she is very struggle with purchasing a bubbling apartment in downtown. You can help her by clicking our ADs or making a purchase via our links ;-)


Want to Learn More About WordPress?

Get Our Free Themes, Plugins, Support, SEO Tips, and Other Tutorials!

Fatal error: Call to undefined function es_subbox() in /home/whatswp/public_html/wp-content/themes/mantra/footer.php on line 140