Adsense is widely used Ad network currently on the globe. 90%
of the website serves Adsense Ads including us.
The best places to add ads on a WordPress blog are:
- Above the header: Placing an ad above the header will make it highly visible to users as soon as they arrive on your page.
- In-between blog posts: Adding an ad after the first or second paragraph of your blog post can be effective as users are already engaged with your content.
- In the sidebar: Placing ads in the sidebar of your blog can be effective if you have a wide enough sidebar and if your ads are properly sized and placed.
- After post content: Placing an ad at the end of a blog post is another effective way to capture user attention.
It is important to ensure that the placement of ads does not negatively impact the user experience or affect the readability of your content.
Do you have any of below Adsense questions? Then you are at right place:
- Manually insert placement code for the AdSense Plugin
- AdSense for WordPress Without Plugins
- Simple way to add Adsense ads in WordPress
- Best way to make money online with Adsense
Option-1:
Use Plugin: Let’s get started on WordPress Plugins first:
Google’s AdSense program lets you sell advertising space for other people’s ads on your website–and not just any ads that Google chooses, but ads that are relevant to your site’s content pages like any other Social Media sites. The service is free, and you earn money every time someone clicks on an ad. Google’s AdSense is perhaps the fastest and easiest
way to generate revenue from a website that contains great content.
Most of the Webmaster depends on Google Adsense for revenue from their blogs/websites. Adding Google Adsense in WordPress Blog is little bit difficult. In order to help new Webmasters, I have collected two best Adsense WordPress Plugins those are available on WP Registry.
1) Google Adsense Ads Manager
Link:
https://wordpress.org/plugins/simplest-adsense-ads-manager/
One of the simplest Google Adsense configuration WordPress Plugin. Get maximum Google Adsense revenue by configuring Adsense correct way.
Why it’s so simple?
- So far you may have used so many Adsense plugin but none of them satisfied your custom need.
- Very simple interface
- Option to add HTML in text area in which you could specify adsense code
- Option to specify alignment options: Right, Left, Center
- Option to specify condition. Show on Home/Page/Post or all
- No performance impact – no extra code
- Option to disable adsense code on specific Post/Page
2) Easy Plugin for AdSense
Link:
http://wordpress.org/plugins/easy-adsense-lite/
Easy AdSense provides a way to generate revenue from your blog using Google AdSense. With its full set of features, Easy AdSense is perhaps the first plugin to give you a complete solution for everything AdSense-related. Easy AdSense enforces the Google AdSense policy of not more than three adsense blocks per page.
Easy Adsense provides Sidebar Widgets:
- For AdSense for content with custom title.
- For search with customizable text or image title.
- Put Link Units or AdSense Blocks in header or footer.
- Suppress ads on all pages (as opposed to posts), or on the front/home page.
- Add a customizable mouse-over border decoration on ad blocks.
Option-2:
Without Plugin add Adsense code into your theme:
I’ve been using Adsense to monetize my site since very long time back in 2009. As you may have a requirement to add 728x90 banner ads
after 1st paragraph and you may add 336x300 large rectangle ads
after 2nd paragraph.
To achieve that – you may not need to use any plugin but instead adding it manually using some WordPress hooks and tricks. There are number of popular WordPress Plugins available out there but shouldn’t use plugin for each and every minor thing on our blog.
Let’s get started:
Step-1
Open your theme’s functions.php
file and put below code into it. Here we are using two variables single_post_ads
and home_page_ads
. Just replace data between <div>
and </div>
. Here I’m using style CSS parameter which you could modify as per your need.
//Insert Adsense code in the middle of Single Post content add_filter( 'the_content', 'crunchify_ads' ); function crunchify_ads( $content ) { // Ad code which we are using on Single post $single_post_ads = '<div align="center" style="margin-bottom:15px;"> <ins class="adsbygoogle" style="display:inline-block;width:336px;height:280px" data-ad-client="ca-pub-xxxxxxxxxxxxxxxx" data-ad-slot="7211141298"></ins> <script>(adsbygoogle = window.adsbygoogle || []).push({});</script> </div>'; // Ad code which we are using on Home/Inde page $home_page_ads = '<div align="center" style="margin-bottom:15px;"> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-xxxxxxxxxxxxxxxx" data-ad-slot="1831796969"></ins> <script>(adsbygoogle = window.adsbygoogle || []).push({});</script> </div>'; if ( is_single() && ! is_admin()) { return crunchify_insert_ads( $single_post_ads, 2, $content ); } if ( is_home() && ! is_admin()) { return crunchify_insert_ads( $home_page_ads, 1, $content ); } return $content; }
Step-2
Add below code also to functions.php
file.
// This function identifies after which paragraph we need to insert ads function crunchify_insert_ads( $ads, $after_which_paragraph, $content ) { $identify_paragraph = '</p>'; $crunchifyData = explode( $identify_paragraph, $content ); foreach ($crunchifyData as $index => $paragraph) { if ( trim( $paragraph ) ) { $crunchifyData[$index] .= $identify_paragraph; } if ( $after_which_paragraph == $index + 1 ) { $crunchifyData[$index] .= $ads; } } return implode( '', $crunchifyData ); }
Above code will identify which paragraph
it is and where to add code. </p>
means end of paragraph. Let me know if you see any issue.
Extra tip:
As you see in above code – i’m not adding adsbygoogle.js
script and putting into functions.php:
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
There is no point
adding the same script 3 times if you have 3 Adsense code. Just add it to your theme’s header once and you are all good. I use All in One Webmaster Plugin which has header section for you to put content into your theme’s header.
Maximum Allowed Adsense ad units on a Web Page?
Hello – Today I came to know that google recently removed restriction on placing only 3 ads per page as per this policy: Ad placement policies – Google AdSense Help 3
Bloggers are free to place more than 3 ads as far as advertising and other paid promotional material added to your pages should not exceed your content.
Because of this I’ve placed 4the ad slot on Crunchify. Let me know if my interpretation is not right.
What is your take on this? Please chime in and let us know.