Once you've created your ad with Google Adsense, you need to insert it into your WordPress site.
Remember: when you add an ad on your site, it's an ad unit you're inserting (not the ad itself). Ads will be downloaded and displayed when a user comes to your site, depending on which ad Google thinks the user is most likely to respond to.
How to insert ads from Google AdSense
Where to place your ad
Before you insert ad units into your site, take some time to consider the best ad positions. This will vary depending on the layout and design of your website and where you get the most of your traffic.
Advertising is not what people have come to your site for. They come to learn more about you or to consume a piece of content they find through search. A screen full of ads will give the impression that your website exists only to make money from advertising and not provide quality content. We've all seen those sites and we've all used the right back button to leave them!
So consider the standard between the ads that people will click against the content that people will want to consume. Encourage them to stay longer and come back again, which will eventually make you more money.
When planning your ad's position, consider:
- Positioning: Do ads in one location catch people's attention, but don't dominate the page or prevent people from consuming your site's content?
- Size: Are ads big enough to get noticed but not so big that they dominate the page or make people unable to view your content?
You should run some ads and check how they work, then try again with a number of different ad unit configurations until you find the ad that best suits your site and visitors. . Strict testing will mean you can make more money from your advertising and gain audience loyalty.
There are several different ways to insert your ad, depending on whether you are using the plugin or manually inserting the code.
Let's start by seeing how you do it with a plugin.
You can use a plugin to manage the entire ad insertion process or simply to add code. A variety of plugins are available for Google Adsense, here I will show you how to use two different approaches.
Use the Plugin to insert the ad code into your website
Your first option is to use the plugin Head, Footer and Post Injections that we used earlier to add your website link code with Google Adsense. You can also use it to add code to your pages and posts.
If you don't have the plugin installed, install and activate it now, then go to Settings> Headers and Footers. Click on the Posts tab.
Now go back to Google Adsense and get the code for your ad unit. If it hasn't opened since you created it, go to Ads> Overview, find the ad unit in the list and click the code icon next to it.
In your website, paste the code into the relevant field in the Posts tab. If you want to create two different sized ad units for mobile and desktop devices, you can paste different code into each field. Or if you want to insert ads on mobile and desktop, paste it in both.
Click the save button at the bottom of the screen and the location of your ad unit will be saved.
Use the Plugin to automatically insert ads
If you don't want to worry about copying and pasting the code and you already use the plugin Advanced Ads – Ad Manager & AdSense To link your website and AdSense account as shown above, you can use the plugin to insert ad units into your site.
Go to Advanced Advertising> Advertising. Select the AdSense Ads radio button and click Next.
The plugin will find ad units you have created in Google AdSense. Select the one you want to work with and click the Next button. If the plugin doesn't find your ad unit, copy the code from AdSense and it will set up ads.
You are then prompted to determine the condition when the ad will not show. For example, you can decide not to show ads to visitors who log in or hide them from specific pages like your landing page if you have them.
If you are happy to show ads in all conditions, leave the settings as default, then click the Next button.
You will then be asked to choose where you want to show the ad. You can pre-select content, in-content, after-content, use shortcodes or some PHP, in the sidebar or title. If you want to use custom locations, you will have to upgrade the plugin.
I will choose After Content. Click on the preferred option and the plugin will place the ad in that position.
If you select the sidebar or footer, the plugin will take you straight to the Widgets screen where you can drag the Advanced Ads widget to the sidebar and configure it. Doing this directly from the Widgets screen or the Customizer will be easier, saving you the plugin installation screens.
Drag the widget into the widget area you want it to display and select the ad unit you want to display.
The ad will then display on your website.
Insert ad unit code manually
If you don't want to use the plugin, you can choose to manually insert the ad unit's code.
You can do this in one of two ways: by pasting the code into a text widget or by pasting the code into the theme's sample file.
Let's take a look at each one.
1. Insert the ad code into the text gadget
One of the easiest ways to insert ads into your website is to copy the code into a text gadget. However, this will only work if your theme has a widget area where you want your ad to appear.
Go to Themes> Extensions or open Customization and select Extensions. Select the widget area that you want the ad to display.
Add a custom HTML Widget to the widget area. Open the widget and copy the Google Adsense code to the ad unit. When you set up your ad unit, make sure you use the layout that will work in your widget area. Square is good.
2. Insert the ad code into the topic template file
You should only do this if you have access to your topic to edit it, because you will have to insert the code into every template file displaying the content where you want your ad to appear. If you are working with a third-party theme, always create sub-topics and edit instead or your changes will be lost in theme updates.
If your theme includes action hooks or filters inside the template files, you can use these files to write your own plugins to add code. I will show you how to do that shortly.
First, choose the type of content you want to display ads on. Assuming they are single posts, in that case you will need to edit post.php.
If you are working with a sub-topic, make a copy of the article.php from your original topic and copy it into your sub-topic. You will then edit that and WordPress will use it to display individual posts instead of the equivalent file from the original topic.
If your theme doesn't have a post.php file, then copy the next file in the template hierarchy: it will be single.php, singular.php, or index.php.
Find the location in your topic template file where you want to display ads and copy the code from your Google Adsense account. You can find it by going to Ads> Overview, finding the ad you want to use and clicking on the code icon next to it.
6 best WordPress advertising plugins to increase blog revenue
Many blogs and large websites rely on ads as their main source of income. This may include Google AdSense, AdSense alternatives, Affiliate Ads or Direct Advertising sales.
One problem that many people encounter is that advertising is a money-making strategy that is difficult to maintain and manage. Struggling with AdSense code and your WordPress theme can quickly become a nightmare for many people. And have you ever tried tracking the banners you sell on your website?
Fortunately, you can easily fix these problems if you set up a professional ad management plugin on your WordPress site. And don't forget to optimize your ads for mobile devices. According to a WordStream study, mobile ads have a 40% higher CTR than desktop ads. Here is a detailed comparison of the 6 best WordPress ad plugins that can help you increase your blog revenue by providing a better ad management solution.
Best WordPress ad insertion plugin
1. Ad Inserter
If you're looking for a solid and well-developed WordPress advertising plugin, we recommend getting started with Ad Inserter. It currently has more than 40,000 active installs with 4.9 out of 5 star rating. This is probably one of the best maintained plugins on the repository and the developer, Igor, is very active in the support forums.
Another great thing about this plugin is that it allows you to insert ads at any point in your post. You can do that before / after the post content, or even by a percentage of your content (or the number of paragraphs). Maybe you want an ad after three free clips, this can do it. It's all automatically set, no short code you have to clutter. It's also easy to exclude specific pages and posts if you probably don't want your ad to appear.
Additional features of the free version include:
- 16 code blocks
- Syntax highlights syntax
- Preview code with intuitive CSS editor
- Manually insert: widget, shortcodes, call PHP function
- Align blocks and styles: left, center, right, left floating, right floating, custom CSS, without wrapping (leaving ad code, otherwise, it is wrapped by a div)
- Clearance option to avoid inserting near images or titles
- Handling PHP code
- Detect server-side and client-side devices (3 custom views)
- Black / white catalog, tags, post IDs, URLs, URL parameters, references
AdRotate is one of the oldest and most popular options when choosing WordPress ad plugins. It has more than 50,000 active installs with a rating of 4.3 out of 5 stars and has been around since the beginning of 2014.
AdRotate is a convenient ad management plugin with lots of bells and whistles. Easy management allows you to edit ad display right from your control panel. You can add, configure, delete and preview multiple banners at a glance. You can place ads that only show to visitors who visit your site from a certain location. There is also a free and premium version of the plugin.
You can schedule each ad to expire after a specified time period or after a certain number of impressions or clicks. You can also choose to be notified by the plugin when the ad is about to expire, by e-mail or (and this is where it's really great!) Or a push notification on your iOS / Android device about the ad. close to expiry If you sell advertising space on your blog, advertisers can even email you directly from their control panel.
AdRotate provides extensive ad tracking – it's easy to see which ads perform best and which ones perform poorly at a glance. CTR (clickthrough rate), daily / monthly statistics and much more is also visible and everything can be exported in CSV. One of its most unique features is the ability to detect when visitors turn on ad blockers and then display a small message (for example, You have an ad blocker enabled – to get the most out of it. This site, we recommend turning it off. "). Ads can also be displayed via shortcodes, widgets or PHP of your topic.
Additional features include:
- Works with Google AdSense, DFP and most other referral / ad servers
- Let your advertisers add / edit / manage their own ads and contact you
- Accept Paypal payment from dashboard when selling ads
- Mobile ads (differentiating tablets from phones)
- Disguise ads from ad blockers so they are not removed
- Easy to use statistics so you can track how each ad is performing
- Advertising responsive
- Place banners randomly, or selected, in pages or posts
- Many groups on each banner position
- Display multiple ads at once in a grid, column or row
- Automatically turn off ads after they expire
- Use shortcodes, widgets or PHP to place ads on your website
3. AdSense Plugin WP QUADS
The AdSense Plugin WP Quads is a fork of the discontinued AdSense ads plugin which was once the most downloaded advertising plugin on the repository. It was rewritten from scratch with a solid code base and supported by the same team that created the MashShare social media sharing plugin. It currently has more than 20,000 active installs with a rating of 4.9 out of 5 stars.
If you just need to get AdSense up and running quickly on your site, this can be a great solution. If you are still using the old Quick AdSense plugin, then this app can be imported quickly so you can easily move through. One of the latest features is that it supports Google AMP ads. Like the above plugins, this version also has a free and premium version. The team also focuses on very good performance to watch and it has no dependencies on external scenarios. Some additional features include:
- Insert specific or random Google AdSense ads anywhere in a post
- Support any Ad code, not limited to Google Adsense only
- Display up to 10 Ads per page.
- Support up to 10 Promo codes on the Sidebar Gadget.
- Support up to 10 Promo-specific & specific placement codes in one post.
- Use shortcode in advertisement
4. Advanced Ads
is a simple ad manager created by publisher for publishers. Based on the experience of the developer offering millions of ads every month, he built this ad plugin as a powerful yet lightweight solution to not only manage and insert banners in WordPress but also to test investigate and optimize them. It currently has over 100,000 active installs with a rating of 4.9 out of 5 stars.
This plugin has been around for a long time and developers are very active in support forums. Just like the other plugins mentioned above, this version also has a free version and then premium add-ons. All supported formats in the plugin, such as ad rotation, ad injection, and ad extensions. Some additional features include:
- Manage and display unlimited ads
- Schedule ads, duplicate ads, and set expiration dates
- Ad code from any ad network or affiliate ad
- Support Google AMP with premium add-ons
- Inject ads anywhere in your content
- Sticky ads, pop-ups, etc. are also available as premium add-ons
5. Plugin Ads Pro
The Pro Plugin Banner is a premium plugin currently on Codecanyon that helps you manage, sell and display your advertising space. If you are familiar with the BuySellAds market, this allows you to set up your own BSA on your website and bypass 3rd parties. It is actually quite awesome! It has more than 2,400 sales with a rating of 4.4 out of 5 stars.
The plugin supports a template and grid system to display really relevant and user friendly ads on your site. And it's 100% free from Ad Blocker. Display your banners, including Google AdSense banners in more than 20 ways! Some additional features include:
- Geo targeting (country, state / province, city or zip code)
- Schedule your ads and control their delays
- Option to display Ads in Specific Devices (mobile, tablet or desktop)
- Filter on Categories and Tags
- Hooks for displaying Ads before / inside / after Content
- Option to show / close Ads after X seconds
- The limit option to show Ads X times per User / Session
- Display your ad in more than 20 different ways (sidebars, floats, videos, background, peeled corners, grids, hover and other ways)
- Giant backend manager (easily manage your ads)
- More than 25 ready to use responsive and user-friendly Ad Templates
- Sell ads with 3 different models: CPC, CPM, CPD
- Support PayPal and Stripe, WooC Commerce and more
If you're looking for a WordPress advertising plugin that allows you to manage your own sales and advertising customers, then this is a must-have!
WP-Insert Plugin is a WordPress advertising plugin that allows you to manage your ads and is optimized for Google AdSense. It was created by the team on SmartLogix Technologies. It currently has over 30,000 active installs with a rating of 4.5 out of 5 stars.
Marketed as the ultimate WordPress plugin, WP-Insert has a lot to live on. Hence, it has a lot going for it. Like the tagline of the plugin says, WP-Insert does more than just place your ads here. It can also manage the Google Analytics tracking code (or any other third party), display legal notices and markup codes in your topic editor.
As you can see there are many great solutions to make advertising management easier in WordPress.
And in fact, many of the plugins above are completely free. And you can expand them with additional premium features like Google AMP support and geotargeting.
So you have no reason to start testing ad positions, better A / B testing and optimizing ads for mobile devices. Do you have a favorite WordPress ad plugin that we missed? If so, let us know by commenting below