How to Add AdSense to WordPress (Visual Guide)

Blog WordPress
Zee Ahmed
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Are you looking for the best guide on adding Google AdSense to WordPress with screenshots?

We’ve got you covered.

We understand Google AdSense is one of the best ways to earn handsome money from the internet, especially WordPress owners.

Don’t you believe me? Here are my earnings from Google AdSense. I know it’s not huge 😀

Google Adsense Earning 2

In this article, you’ll learn the followings:

  • How to add Google AdSense to WordPress in 2 ways: manually and using a plugin.
  • How much money you can earn with Google AdSense on WordPress.
  • Frequently asked questions about adding Google AdSense to WordPress.

Are you ready? Let’s get started.

What is Google AdSense?

Google Adsense 1

Google AdSense employs technologies to serve advertisements based on the website content, the user’s geographic location, and other aspects.

It has no doubt AdSense is among the most well-known monetization platforms globally, not because it offers the highest quality of ads but gives the highest earnings to the publishers than any other platform on the planet.

You might think how Google earns 160 billion U.S. dollars per year?

Google receives money from the advertisers that bid to show their ads on Google Search using Google Ads.

How Much Google Earns 1

Did you know? Almost every niche uses Google AdSense to earn money. Take the below examples:

  • Pitchfork – Music Blog

Google Adsense On Pitchfork 1

  • TechRadar – Technology News and Reviews Blog

Google Adsense On Techradar 1

  • Freepik – Free Vector and Graphic Resource Website

Google Adsense On Freepik 1

  • The Guardian – News Website

Google Adsense On The Gurdian 1

Did you know? More than 38 million websites use Google AdSense, according to Builtwith.

More Than 38 Million Websites Use Google Adsense 1

The secret to generating a handsome amount of money through Google AdSense is to write high-quality content on keywords that people search.

According to SERPIQ, the top websites have a higher word count than the ones that rank lower.

Serp Iq Content Length 1

Simply learning SEO can give you the advantage of dominating your website on Google Search, of course, generating more money from Google AdSense.

How Does Google AdSense Work with WordPress?

Google AdSense and Google ads work together. Google Ads have advertisers that bid on keywords, and their ads are shown on publishers’ websites using Google AdSense.

In a nutshell, Google AdSense works based on three steps:

a) You place the ads on your website. Google AdSense offers different ad units to place on your website to earn revenue.

b) Ads appear on your website. The advertisers who have paid the most money to Google will be able to place ads on your website using Google Ads.

c) Get the payment. When you have earned at least $100, you get paid.

How to Add AdSense to WordPress [Step by Step]

I’ll explain two ways to add AdSense to WordPress: manually and using a plugin.

Before You Start: Approve Google AdSense On Your Website

You cannot add Google AdSense to your WordPress until you have approved Google AdSense.

It’s not 2003 when you could sign up for Google AdSense and show ads instantly.

But don’t worry, I’ll explain how you can use my experience to approve your Google AdSense:

  • Write at least 50 articles on your website on the niche that Google AdSense allows. Not have an idea? Simple go to the AdSense calculator and see the category you can work on.

Category Google Adsense

  • Make sure the content you write is based on low competition keywords.

Want to know how to find the best topics? Go to Google Trends and have a look at the trend trends.

Google Trends

Now visit AnswerthePublic and write the topic you’re interested in.

Answer The Public SEO Tool

The tool will show you all the keywords extracted from Google API instantly. These are the keywords that are being searched on the internet.


Warning: Google Trends show the keyword, Super Bowl 2021,  is a seasonal keyword meaning you’ll get traffic until the season lasts. You should select evergreen keywords from the SEO tools like SEMrush, Ahrefs, or Ubersuggest.

Season Websites

  • Now apply for Google AdSense approval with a new Google account — important. You’ll get a Google AdSense code to place inside the <head>.

Google Adsense Code

Now go to Appearance > Theme Editor > Header.php > Paste the code within <head> as shown below. Don’t forget to update the file.

Paste Head In Update File

You’ll get approval within a week, provided your website is ready, meaning to have 50 unique articles.

Google Adsense Good News

Way 1 – Adding AdSense to WordPress with a Plugin is filled with 8000+ plugins for Google AdSense.

Google Adsense Total Plugins On  1

Not all plugins are created equal. I’ll recommend installing the plugin “Ads by WP QUADS.”


The reason is simple. It has been installed by more than 60,000 with 5-star ratings.

And the best part? The features it provides:

  • Geo-Targeting. You can target the ads based on the city and countries.
  • Google AdSense: It supports all ad types.
  • Easy to use. The panel is built on React J.S.

And many more great features.

Without further waiting, install the plugin on your website. Once you have installed it, go to WP QUADS > Ads. Click to Create Ad.

Create Ad 1

You come up with plenty of ad integrations, select Google AdSense.

Google Adsense Select 1

You can select any ad type like Display Ads, In-feed Ads, In-article Ads, Auto Ads, and matched content.

AdSense Type 1

It demands data like Data Client ID, Data Slot ID, and the Size of your ad.

Data Client ID And Data Slot ID And Size 1

At the moment, we don’t have the above data since we haven’t created the ad unit in Google AdSense.

Login to our AdSense account and create a Display ad unit. Once you have signed in the Google AdSense, go to Ads > Overview > by Ad Unit.

Overview The Display Ads 1

You’ll develop a new window where you can name your ad, display ad types like square, horizontal or vertical, select the ad size to be responsive, and click Create.

Create The Adsense Ad Unit 1

You’ll instantly get all the important data we needed, like a data ad client and the data ad slot.

Copy Code Snippet Of Adsense For Display 1

Copy and paste into the WP QUADS boxes like this:

Data Client ID And Data Slot ID Taken From Google Adsense 1

Then it asks a few simple questions about the ads where they should appear on your website.

Where Will The Ad Appear 1

It means you can show any ad:

  • Beginning of Post
  • Middle of Post
  • End of Post
  • Right after the <!–more→ tag
  • Right before the last Paragraph
  • After Paragraph
  • After Image
  • By Word Count
  • After the Percentage
  • Ad After HTML tag
  • Ads in between Loop
  • Shortcode (Manually)

So I selected the Display ads and put them at the beginning of the post. I selected the ads that should appear on all the posts I have published on my blog.

Of course, you have the option to disable ads on certain conditions like the country, city, To the, and user-agent.

Exclude The Post On 1

Once you have done the steps, it’s time to publish our ad.

Publish The Ads 1

You’ll get a success message.

Your Ad Is Now Live 1

As you can see, the ad is appearing after the first paragraph.

First Ad After The Paragrah 1

To create the second ad, click on the button Create Ad.

Create Second Ad With WP QUADS 1

Way 2 – Adding AdSense to WordPress without a Plugin

It’s a good practice to add AdSense to your WordPress site without a plugin, as the plugins are among the major reasons that make WordPress vulnerable to hacking.

How WordPress Websites Are Hacked 2

The fewer the plugins, the better for your website’s security and performance. It’s time to add Google AdSense to WordPress without using any plugin.

Let’s first create an ad unit from scratch. This time, let’s create the Link ads.

Link Ads 1

You’ll get plenty of options to choose from, for instance, ad size, text color, and background color.

Link Ad In Google Adsense 1

Take a look at the data ad client and the data ad slot.

Link Ad 1

So, we want to put the ads after the second paragraph manually.  Go to Appearance> Theme Editor > choose Theme Function, function.php. Now paste the below code anywhere.

//Place ads after the 2nd paragraph.

add_filter( ‘the_content’, ‘prefix_insert_post_ads’ );

function prefix_insert_post_ads( $content ) {

        $ad_code = ‘<div>Ads code goes here</div>’;

        if ( is_single() && ! is_admin() ) {

            return prefix_insert_after_paragraph( $ad_code, 2, $content );


        return $content;


// Parent Function that makes the magic happen

function prefix_insert_after_paragraph( $insertion, $paragraph_id, $content ) {

        $closing_p = ‘</p>’;

        $paragraphs = explode( $closing_p, $content );

        foreach ($paragraphs as $index => $paragraph) {

            if ( trim( $paragraph ) ) {

                $paragraphs[$index] .= $closing_p;


            if ( $paragraph_id == $index + 1 ) {

                $paragraphs[$index] .= $insertion;



        return implode( ”, $paragraphs );


Theme Function Manaully Google Adsense Code Pasting 1

You should paste your ad code within the phrase that says, “Ads code goes here.” You can paste here any ad type code, even an HTML picture.

Moreover, if you want to show the ad after the paragraph 12, you can change from the following code “return prefix_insert_after_paragraph( $ad_code, 2, $content );”

Once you have pasted the code, don’t forget to hit the button Save Changes.

Final Thoughts

Adding Google AdSense to WordPress is easy. All you need is to copy the ad unit script and paste it into your website’s desired location.

If you don’t know how to place ads manually, you can use any Google AdSense plugin. It places ads automatically across your website.

As we discussed, it’s better to place ads without a plugin since plugins contribute the most vulnerabilities in WordPress.

If you have a question, don’t hesitate to ask below. I promise you’ll get a reply.

Frequently Asked Questions

Is Google AdSense Free?

Fortunately, Google AdSense is 100% free. You don’t need to pay anything to use its service. Google doesn’t need your money to pay you the money. 😊

When Does Google AdSense Pay?

Google AdSense starts releasing payments to publishers from the 21st of each month. Many publishers get payments between 21 to 26 of each month.

For example, if you choose Western Union, you’re more likely to receive your payment on the 22nd of each month or before.

Is Google AdSense Worth It?

Yes, Google AdSense is worth it, depending on the niche you work on. For example, if you write content on the best gaming laptop, you can earn double or triple using the Amazon Affiliate program instead of earning from your Google AdSense. It’s better to find the best affiliate network that pays the highest amount in your niche.

Is Google AdSense Safe?

Google AdSense is 100% safe since Google created it in 2004 and has been improving the product since then — 17 years of continuous improvement.

Some Google AdSense accounts are banned due to the invalid activity when competitors start clicking on your ads.

How to Keep Google AdSense Safe from Invalid Activity?

You can take plenty of precautionary measures like installing Cloudflare and set the security to Under Attack. And block the visitor if he clicks on your ad twice. And don’t show up ads to the countries that are dangerous like Russia.

Can Google AdSense Pay To Paypal?

Unfortunately, Google AdSense doesn’t pay to Paypal. Google AdSense allows you to collect payment from the following methods:

  • Checks
  • Electronic Funds Transfer (EFT)
  • EFT via Single Euro Payments Area (SEPA)
  • Rapida
  • Wire Transfer.

How Google AdSense Calculates Earnings?

Google AdSense calculates earnings based on various factors like the country where the visitors came from, the niche you’re working on, and the ad quality.

For example, if you get most of the USA traffic, you can earn 10 times more than India’s traffic.

Did you know Google AdSense has created a calculator that shows you the estimated earning you can earn from Google AdSense depending on your website traffic?

Google Adsense Earning 1

What’s the best AdSense Ad Size?

The best performing Google AdSense ad sizes are the followings:

  • The Medium Rectangle (300×250)
  • Large Rectangle (336×280)
  • The Leaderboard (728×90)
  • Half Page aka Large Skyscraper (300×600)
  • Large Mobile Banner (320×100)
  • Mobile Leaderboard (320×50)

What’s the Best AdSense Placement?

It’s tricky. My trick is to find the ad placement of the best website in your country that has been in the industry for more than a decade because they have cracked the code of earning the most money.

The best-performing ad placement is in the header, before the first paragraph, the last paragraph, on the sidebar, and ad placement every after 10 paragraphs.