How to Insert Google AdSense Code in WordPress Header for Activation

There are several ways to add/insert Google AdSense code in WordPress header websites or Blog. After applying for Google AdSense, you will be given some verification codes. You will be required to paste it in the header of your blog.

For those who may not want to crash their blog, this article is for you. You do not need be a tech guru before you can do this. I have tried the below ways, and it works.


Insert Google AdSense Code to WordPress Header Requirements

Before you proceed, you must have applied for Google AdSense, and maybe got stuck at where you are required to place the AdSense code in WordPress Header.

If you are using Blogger platform, this article is not for you.

For a faster review and approval, you have to add the code to your WordPress website immediately it is generated;


How to Insert Google AdSense Code

The steps below are followed by screenshots. Please make sure you go through all the steps.

  • Sign in to Google AdSense Account.
  • When Once you have signed up into your WordPress blog or website, the next thing to do is to copy the Adsense code.
  • Click on the ‘Copy Code’ button. Do not click on ‘Done’ just yet. First, you need to add this code to your WordPress site before you click on continue.

To Add the code to your wordpress site, you can use either of the below methods:

  • Plugins
  • Directly from WordPress theme editor.
  • Using FTP

The most commonly used methods are the plugins and using wordpress theme editor.


I will discuss the two, and then give you tips on the third one.




First Method: Using Plugins to Insert Google Ads code to WordPress header

insert Google AdSense code in wordpress header

  • After installation, Under settings, click on header and footer scripts.

insert Google AdSense code in wordpress header

  • Add AdSense verification code to site header using the plugin.
  • Click on ‘save settings”.


After successfully adding your AdSense verification code to your WordPress website using any of the above methods, the next thing you must do is select the options to ‘show ads as soon as my account is activated’ and ‘I’ve pasted the code to my site’ then click on ‘DONE’ to continue.




Second Method:  Directly from WordPress theme editor:

WordPress has the default theme editor that allows developers make adjustments to the code powering WordPress. If you have the knowledge of HTML tags, then it will be easier for you to use this method. This method somehow involves technical know how. Any mistake here can cause a serious problem to your blog or website.

  • In your WordPress dashboard, Hover on appearance and click on Theme Editor. You will get something similar to the screenshot below:

insert Google AdSense code in wordpress header

  • Make sure the theme you want to add your code to is selected and click on headers.php. 

If you are familiar with web design, you must have head about head tags. The header.php is a WordPress file that powers the head tags of WordPress website or blog.



  • Add your AdSense verification code directly below your the <head> tag.

  • Save changes made to theme file by clicking on Update File.


When you are done, you can then wait to hear from Google AdSense team. If your account gets approved, you can continue with the next step: Creating ad units and adding them to your WordPress website. However, if your account was not approved, you cannot continue with the next step.


About the Author


  1. 7c 9 months ago
  2. Bill 9 months ago

Leave a Reply

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