
Step-by-Step Guide: Adding AdSense Code After < head > in WordPress
To add Google AdSense code after the <head>
tag in WordPress, you can use a plugin or edit the theme files directly. Here’s a step-by-step guide for both methods:
Method 1: Using a Plugin (Insert Headers and Footers)
1- Log in to your WordPress dashboard.
2- Go to “Plugins” and click on “Add New“.

3- Search for the “Insert Headers and Footers” plugin.
4- Install and activate the plugin.

5- Once activated, go to “Settings” and click on “Insert Headers and Footers“.

6- In the “Scripts in Header” section, paste your AdSense code.

7- Click on the “Save” button to save your changes.
Method 2: Editing the Theme Files (manual method)
1- Log in to your WordPress dashboard.
2- Go to “Appearance” and click on “Theme Editor“.

3- On the right-hand side, you’ll see a list of theme files. Look for “header.php“, “wp-header.php“, “head.php” or “wp-head.php” and click on it.
4- Right after the <head>
tag, insert your AdSense code. It should look like this:

5- Scroll down and click on the “Update File” button to save the changes.

By following these steps, your AdSense code will be added after the <head>
tag on your WordPress site. However, please note that modifying theme files directly can be risky if not done carefully, as it may lead to unintended issues. It’s always recommended to have a backup of your files and exercise caution when making changes to your theme files.
[…] review, you need to add the Adsense code to your website. If you use WordPress, follow our guide on how to add Adsense code to WordPress. After adding the code, return to the Adsense page and click “Request review“. […]