Quick Guide: How To Add Adsense Code To WordPress

In the sign-up process for Adsense account, you will be asked to add Adsense code on your website for account review. However, you’ll only see blank Adsense ad units on your site until your Adsense account is reviewed. 

Once your account gets approval, you can further add Adsense code on your site for earning revenue.

It’s easy to add Adsense code on any blogging platform or website. In fact,WordPress makes it easy to add Google Adsense ad code at any desired location on your website.You just need to determine where you want to show the ad on your website.

how to add adsense ad code to wordpress

You can do simple ad management on your website with/without the help of any plugin.In this article, I will pictorially show you how to add Adsense to your WordPress Site directly without the need of a plugin.

Beginners Step-by-Step Guide to Add Adsense Code to Your WordPress Site

Adding Ads is quick and easy in WordPress. Once you’re done with the Adsense Ad unit creation, Google displays the HTML code for the ads.All you have to do is copy and paste this code into the HTML code for your web page.

But before we start, In case if you want to center the ads in your webpage, you need to modify your Adsense code.Otherwise you can use the code straightaway.Try any one of these two ways to center your ad block.

1) <center> your Adsense code here </center>

2) <div style=”text-align: center;”> your google Adsense code here </div>

QUICK MONEY HACK
  • Vindale Research - The biggest plus about Vindale Research is many of their surveys pay quite well. Each survey can pay you anywhere between .50 to $50. So, there is a good chance that you can earn good money from a single survey. The best part is that you get instant $2 FREE when you sign up for Vindale Research
  • Survey Junkie - Joining Survey Junkie is a no-brainer. Their surveys are short, easy, and you can pick and choose which surveys you want to take.  The site pays up to $45 per Survey and has a 4-star rating on Trustpilot. Start earning now
Few more sites that require email confirmation on your end:
  • InboxDollars (US) orInboxPounds (UK) - Inbox Dollars makes it easy to earn money for taking polls, answering surveys (up to $35 per Survey), watching videos, reading emails, referring friends, playing games, shopping online, and lot more! Get a $5 sign-up bonus upon registration and successful activation. Join Now
  • Swagbucks - I only heard good things about Swagbucks. A friend of mine made $60.00 plus this month, easy  $5 - $6 a day watching funny videos on Swagbucks. I bet you'll love Swagbucks. Just like Inbox Dollars, Swagbucks also pays a $5 sign-up bonus upon email confirmation. Sign Up here.

Most commonly ads are placed in the sidebars, header, footer and in the blog posts.

This post will show you exactly how to place your ad code in WordPress. Depending on where you want to place your ads, follow the below steps accordingly.

Firstly, Login to your WordPress Dashboard.

How to Add Adsense to WordPress Sidebar

Step 1: Go to ‘Appearance’ Section and click on ‘Widgets’.

Step 2: Next drag & drop the “Text/HTML” widget into the ‘Sidebar’ widget and paste the Adsense code.

Step 3:  Click Save to complete.

how to add adsense to wordpress sidebar

How to Add Adsense code to Website Header

Step 1: Go to ‘Appearance’ Section, click on ‘Editor’ and look for “header.php” file.

Step 2: Open the ‘hearder.php’ file, click edit and paste the Adsense code into the file as shown below.

Note: You have to add Adsense code, immediately below <head> or just before the </head>  in the header file.

Step 3:  Finally, Update file to Finish!

how to add adsense to wordpress website header

How to Add Adsense code to Website Footer

Step 1: Go to ‘Appearance’ Section, click on ‘Editor’ and look for “footer.php” file.

Step 2: Open the ‘footer.php’ file, click edit and paste the Adsense code into the file as shown below.

Note: You have to add Adsense code, immediately below <footer> or just before the </footer> in the footer file.

Step 3:  Update file to complete the process.

how to add adsense in wordpress website footer

How to Add Adsense code In Your WordPress Posts

You can add Adsense ad code into your blog posts manually in two ways:

Firstly, through your WordPress Editor;

Step 1: Go to ‘Appearance’ Section, click on ‘Editor’ and look for “Content-single.php” file.

Step 2: Open the ‘Content-single.php‘ file, click edit and paste the Adsense code into the file as per your choice of ad placement.

Note: For the Adsense Ads to appear immediately below the Blog post title, you need to add Adsense code, after <h1 class=”entry -title”><?php the_title( );?></h1> i.e just before the <! – – .entry-header – -></header>  in ‘Content-single.php’ file as shown below.

how to add adsense in wordpress blog posts

In the similar manner, For the Adsense Ads to appear below the Blog post Content, you need to add Adsense code, towards the end after <! – –  #post -<?php the_ID( );  ?>   – -></article>  in the same ‘Content-single.php’ file as shown below.

how to add adsense code in wordpress blog post content

Step 3:  Finally, Update the file to Finish!

If you want to insert adsense code anywhere inside your WordPress posts, check this video:

                                 

Secondly, through your Blog theme.

If you have purchased a theme for your site, you can easily do Ad Management with your theme’s options panel. Look for ‘Ad Management’ feature in your  theme dashboard.

You can control everything from here, without using separate plugins.

Here, I use MyThemeShop Sensational theme, which simplifies ad management for my website. Let me show you!

Step 1: Go to ‘Appearance’ Section, click on ‘Theme Options’ and look for “Ad Management”.

Step 2: Open Ad Management, you can now choose to ADD Adsense code either Below Post Title or Below Post Content.

Step 3: Paste the Adsense code into the slot provided for this purpose as shown below.

how to add adsense in post content

Note: With this feature, you can also choose to enter the number of days after which you want to show the Ad.

Step 4:  Save Changes to complete the process.

Your website now displays the ad block at your desired locations, with ads relevant to the content on your webpage.In case if the ads don’t show-up, you need to wait a while for the ad unit to become active.

Winding Up:

In addition to Google Adsense, this process is applicable to display any banner advertising . For better placement control, I recommend you to try ‘Google Adsense’ or ‘Simple Ads Manager’ WordPress plugin. With Google Adsense plugin you can manage only Adsense Ads.

I hope this article will help you place ads onto your WordPress site. Let me know what you are using to manage Adsense ads on your WordPress site by leaving a comment below.

10 thoughts on “Quick Guide: How To Add Adsense Code To WordPress”

  1. thank you so much. I must have googled instructions and watched countless youtube videos for basic instructions on how to do the first step: connecting adsense to wordpress for the approval process. Thank you again.

  2. thanks for sharing, i’m very confuse for added code adsense for my site .
    today i’m received email Google Adsense Plugin for WordPress will not avaialble on may so i must can manage ads , hhe

  3. Hi, How do I enable the “Editor” setting under “Appearance”?

    I have searched the web for instructions, but all of them were piece-wise. Do you happen to know where I can find a one-stop information to enable “Editor”?

    Thanks!

    1. Hi Zenov!

      Happy to have you here 🙂

      If you are on a WordPress site, you can enable the editors by changing your wp-config.php file.

      Use FTP and go to the location of your WordPress site.
      Open wp-config.php on your computer.
      Search for:
      define(‘DISALLOW_FILE_EDIT’, true);
      Change true to false:
      define(‘DISALLOW_FILE_EDIT’, false);
      Save the file and upload it back again.

      Hope this helps

Leave a Comment

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.