I’ve spoken before about using Google AdSense to monetize your WordPress blog. AdSense is one of the easiest ways to start earning money from blogging, and while it’s perhaps not the most lucrative way to monetize, it’s pretty straightforward to set up. So I’m going to explain how to add Google AdSense to WordPress and I’ll give you 5 different options for doing so:
- Configuring AdSense Auto Ads for WordPress
- Using WordPress plugins for AdSense
- Displaying AdSense in your WordPress sidebar.
- Including AdSense ads in WordPress reusable blocks.
- Adding AdSense to your theme files.
5 Ways to Add AdSense to WordPress
Before we begin, you’ll need to have an approved Google AdSense account and the domain on which you’re planning to show ads must be verified. here’s how to create a Google AdSense account. Approval normally takes a few days assuming your blog is eligible for the program.
So let’s move on to the techniques you can use to get AdSense running on WordPress.
1. Adding Auto-Ads to WordPress
Perhaps the most simple way to add Google AdSense toWordPress is to allow the AdSense system to place ads itself.
When you log in to your AdSense account you’ll see your navigation menu on the left-hand side of the screen:
Click on the Ads link and that will open up your AdSense ad options page:
At the top of the page you have two options:
- By site.
- By ad unit.
The option to display ads “By site” is the Auto Ads function, whereby AdSense will automatically place ads on your WordPress blog. This option is selected by default. “By ad unit” is the option you’d take to select code for specific ads unit on your blog.
At the bottom of this area. you’ll see all sites in your AdSense account that are verified to display ads.
To enable AdSense Auto Ads, select the edit button (the pen symbol) from the “By site” screen. This will open up the Auto Ads configuration screen:
When you click to enable Auto Ads, AdSense will present you with a menu of configurations options:
Auto Ads Settings
Under the “Ad formats” section, you can select the following options:
- In-page ads: These are ads that will appear in the body of your content.
- Matched content: A setting designed to increase revenue and engagement by making Auto Ads more relevant to your visitors.
- Anchor: Configure ads to stick to the edge of the user’s screen and make them easily dismissible.
- Vignette: These are ads on mobile devices that deliver full-screen ads between page loads.
The “Ad load” section enables you to specify how many Auto Ads you want delivered at any one time. If you want to maximize earnings from AdSense Auto Ads you’d select the maximum allowed. However, you can throttle this down to a minimum if you’d prefer less ads to disrupt the experience your visitors have.
The last section is “Page exclusions”. You use this to specify pages where you do not want Auto Ads shown.
Once you’ve configured all of the Auto Ads settings, you just need to click “Apply to site” and Goggle AdSense Auto Ads will be activated on your blog.
Advantages and Disadvantages of Google AdSense Auto Ads
- Advantages: AdSense Auto Ads are super easy to set up.
- Disadvantages: You might not like where Auto Ads appear on your blog, since you have no say in where they appear on your pages.
2. WordPress Plugins for AdSense
If you want more control over where your AdSense ads show on your WordPress blog you could use a plugin. There are dozens that will manage the work of displaying AdSense without you having to edit theme files or using widgets.
In the past I’ve used WordPress plugins for AdSense ad delivery, but I haven’t used any recently… running too many WordPress plugins can impact your page load speed and I prefer to use as few as possible.
Nonetheless many people prefer the ease of using a plugin for AdSense, so here are a few I’ve heard about:
- Insert Headers and Footers – 1+ million active installations and a 4 star rating on WordPress.
- Ad Inserter Ad Manager & AdSense Ad – 300,000+ active installations and a 5 star rating on WordPress.
- Advanced Ads Ad Manager & AdSense – 100,000+ active installations and a 5 star rating on WordPress.
I should say I haven’t used any of these plugins for AdSense but they’re widely used and have good reviews.
Advantages and Disadvantages of WordPress Plugins for AdSense
- Advantages: A plugin will make it easier for you to add AdSense ads where you want them to appear.
- Disadvantages: Another plugin installation will possibly make your blog slower and add to page load speed times.
3. Adding AdSense to Your WordPress Sidebar
We’re moving in the direction of manually adding AdSense ads to your WordPress blog, but this is actually a relatively simple way to automate ads in your sidebar.
For this, you’ll need to generate some ad code in the AdSense system. Go back to your AdSense account and head to the ad options page I discussed for enabling Auto Ads… you’ll find this from your main dashboard page by click the “Ads” link.
When you’re on the main Ads page, click the “By ad unit” option:
Selecting AdSense Ad Units
Now you have to select the ad type you require. For WordPress sidebars I’d probably opt for either:
- Display ads.
- In-article ads.
- Link ads.
When you select either of these ad types you’ll then open up a screen where you can customize the ad to fit in with your WordPress theme (heading color, font, etc.).
Although these ads will be responsive and adapt to screen size, remember that they’ll be going into your sidebar. If you opt for Display or Link ad types, opt to use the “Square” or “Vertical” options. The In-article ad type is fully responsive and will adapt to fit in the sidebar regardless of width.
When you’ve selected and customized your ad type, click “Save and get code”. This will present you with the AdSense code you’ll need to use for your sidebar.
Take the code you’ve copied and head back to your WordPress Admin dashboard. You’re going to create a widget to add to your sidebar, so click on the Appearance > Widgets link in your WordPress navigation menu.
When you’re on the Widgets page, drag a “Custom HTML” widget to your the sidebar widget area in which you want the ad to display, paste your AdSense code into it and click save.
Your ads should now appear in your sidebar.
Advantages and Disadvantages of AdSense in Your SideBar
- Advantages: Easy to implement and it appears on all pages where your sidebar shows.
- Disadvantages: Since the ad is not integrated into your post content it may not get engagement and therefore not earn you very much.
4. Adding Google AdSense Ads to WordPress Reusable Blocks
As a way to insert ads into your posts, create another as in your AdSense account, as we did above for the sidebar. This time though choose the “In-article ad” type. Customize the ad to fit your blog, click “Save and get code” and copy the AdSense code.
Create a reusable block in WordPress by visiting:
You can create a new block here: give it a name like “AdSense for Blog Posts”, add an HTML block to it and paste your AdSense In-article ad code into the HTML field. Click save when you’re done.
Now every time you’re writing or editing a post you’ll be able to add this reusable block at any point by clicking to add a reusable block and selecting the once containing your AdSense code.
Find out more about reusable blocks in WordPress.
Advantages and Disadvantages of AdSense in Reusable Blocks
- Advantages: Easy to implement and you place it precisely where you want it to appear in your post content.
- Disadvantages: It’s manual. This is okay if you’re starting today, but if you haven’t included a reusable block as a placeholder in every post you’ve published, you’ll have to edit each one to manually to add a new reusable AdSense block.
5. Adding AdSense to Your Theme Files
This is something I’d recommend only to those comfortable with editing WordPress theme files and confident with PHP, and only then if you’re using a WordPress child theme.
To have an AdSense ad block appear on all your post pages you could edit a WordPress theme file to to do. Now the exact file you’d need to edit will vary depending upon how your theme works. It may be that you’d need to add your code to your functions.php file or you may have a customized version of the functions file for your theme.
You could also add the code into your header.php and / or footer.php to display AdSense blocks at the top or bottom of your post.
For me this is a risky way to add AsSense to your blog, especially if you’re new to WordPress and PHP. Fouling up your theme files can result in a broken WordPress blog… nobody wants that. I only reference adding AdSense in this way because it is possible to do… but it doesn’t mean you should!
Advantages and Disadvantages of AdSense in Reusable Blocks
- Advantages: Once you’ve identified the correct theme file to update, the solution will run automatically and populate all your posts.
- Disadvantages: It’s dangerous if you don’t know what you’re doing… you could easily break your WordPress theme.
- There are a number of ways to add Google AdSense to WordPress. However, you’ll need to have an approved AdSense account and a verified domain to generate AdSense code..
- You can add AdSense code to WordPress manually through sidebar widgets, reusable blocks or by editing theme files (not recommended).
- If you’re not confident to create widgets and reusable blocks, you can always install and activate a WordPress plugin for AdSense.
That’s all for now folks!
Any comments or question about how to add Google AdSense to WordPress? Leave me a comment below and I’ll get back to you!