Name: Easy AdSense
Stable tag: 6.52
Author: WP Plus
Requires at least: 2.6
Tested up to: 3.7
Tags: adsense, google adsense, ads, advertising, easy adsense, google, adsense plugin
See Also: Other plugins
Easy AdSense provides a very easy 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.
- Enforces the Google policy of not more than three ad blocks per page.
- Sidebar Widgets:
- For AdSense for content with custom title.
- For search with customizable text or image title.
- For Link Units.
- Rich set of Options:
- Put Link Units or Ad 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.
- Display ad blocks based on the post length.
- Control over the positioning and display of AdSense blocks in each post or page.
- Simplest possible configuration interface -- nothing more than cutting and pasting AdSense code, and with sensible defaults for the few options present, all with clear instructions.
- Internationalized (multiple languages supported).
- Safe Content filter: To ensure that your Google AdSense ads show only on those pages that seem to comply with Google AdSense policies, which can be important since some comments may render your pages inconsistent with those policies.
- IP filter: Ability to specify a list of computers where your ads will not be shown, in order to prevent accidental clicks on your own ads -- one of the main reasons AdSense bans you. These features will minimize your chance of getting banned.
- Compatibility mode: To solve the issue of the ad insertion messing up your page appearances when using some themes.
- Shortcode support: Show the ads only on the pages or posts you want, and exactly where you want them.
- Mobile support: Ability to suppress ads on mobile devices.
- Ability to show a configurable number of ads on Excerpts (which make up the home page in some themes).
- Real text-wrapping option in Leadout ad blocks. In the Lite version, text-wrapping in the lead-out ad block may fail in some cases.
If you feel that these features are a bit too much, consider my lean and mean AdSense plugin AdSense Now!
PS: You'll need a Google AdSense Account.
A major version upgrade is planned for later this year, which will be released as a new plugin, Google AdSense. This plugin will sport a modern, tabbed interface, and a completely re-written, refactored and optimized codebase and option data model, resulting in a more robust and extensible design, and better performance.
New in this Release
Compatibility with WP3.7. Translation updates.
- Upload the Easy AdSense plugin (the whole easy-adsense folder) to the '/wp-content/plugins/' directory.
- Activate the plugin through the 'Plugins' menu in WordPress.
- Go to the Setup -> Easy AdSense and enter your AdSense code and options.
- Go to Themes -> Widgets to add widgets to your side bar(s).
Although the Easy AdSense plugin is designed to handle Google AdSense efficiently, there is nothing preventing you from using the text boxes to place any other kind of text in your blog posts and pages. In particular, you can use ad text from other providers, especially in the header and footer.
To install the professional version of the plugin, please deactivage the Lite version (if any) first. Then upload the zip file that you download after your purchase using the WordPress admin interface shown below.
The plugin is updated also by following the same process, preferably from the plugin Admin page where you will see a file-upload form when an update is ready. The first update for your purchased plugin is always free.
- V6.60: Compatibility with WP3.7. Translation updates. [Nov 7, 2013]
- V6.52: Fixing a bug that prevented ads from showing on static pages. [Nov 6, 2013]
- V6.51: Suppressing a warning when starting for the first time. [Oct 15, 2013]
- V6.50: Adding mobile support. [Aug 22, 2013]
- V6.40: Adding shortcode support. See FAQ. [Aug 21, 2013]
- V6.30: Compatibility with WP3.6. Enhancements in homepage ads. [Aug 8, 2013]
- V6.23: Details on how to suppress the red placeholder boxes. [Jul 27, 2013]
- V6.22: New option to prevent line-breaks in ad insertion. [Jul 3, 2013]
- V6.20: Correcting W3C markup validation errors on the admin page. [Apr 27, 2013]
- V6.10: Fixing a cross-site request forgery vulnerability. (Credit: Charlie Eriksen via Secunia SVCRP.) [Apr 27, 2013]
- V6.06: More translation updates, better session handling. [Mar 29, 2013]
- V6.05: Bug fix on widget objects. [Jan 2, 2012]
- V6.04: Refactoring to auto-deactivate the lite version, if needed. [Dec 23, 2012]
- V6.03: Documentation changes, testing with WP3.5, translation updates. [Dec 22, 2012]
- V6.02: Fixing the incompatibility with Jetpack, updating translations. [Dec 17, 2012]
- V6.01: Moving some options flattening to the object constructor. [Nov 2, 2012]
- V6.00: Major re-organization of the code. [Nov 1, 2012]
- V5.44: The red boxes on the blog pages can now be suppressed. [Oct 27, 2012]
- V5.43: The above-header placement does not mess up the RSS feed now. [Oct 27, 2012]
- V5.42: Fixes in the plugin updater. [Oct 16, 2012]
- V5.41: Fixes in the plugin updater. [Oct 16, 2012]
- V5.40: Rolling out update check and install from the Admin interface. [Sep 25, 2012]
- V5.30: Admin interface modifications. Updating some translations. [Sep 21, 2012]
- V5.20: Coding improvements: refactoring, minor fixes. [Aug 30, 2012]
- V5.19: Taking care of some debug notices from WordPress debug mode. [Aug 27, 2012]
- V5.18: A bug fix in the pro feature Banned IPs. [Aug 22, 2012]
- V5.17: Adding nl_NL translation. [Aug 12, 2012]
- V5.16: Ensuring compatibility with WP3.4+. [July 18, 2012]
- V5.15: Updating translations. Adding some text on the admin page about rating. [June 18, 2012]
- V5.14: Integration of ez-update module and affiliation. [May 15, 2012]
- V5.13: Fixing a minor sequencing error in applying the compatibility mode to some ad placement options. [Apr 21, 2012]
- V5.12: Renaming a conflicting function strip_only. [Mar 28, 2012]
- V5.11: Translation updates. [Mar 8, 2012]
- V5.10: Fixing the float options for lead-out ad block. An option to show ads on excerpts, so that they appear on the home page of some blogs. Translation updates. [Jan 8, 2012]
- V5.03: Releasing Korean translation and updating Thai translation. [Nov 12, 2011]
- V5.02: Removing unused code and trimming readme.txt. [Nov 3, 2011]
- V5.01: Adding comment contents to Google AdSense policy filter. [Oct 31, 2011]
- V5.00: Moving the old Pro features to the Lite edition, and releasing it. [Oct 25, 2011]
- V4.10: Removing unused, legacy code. [Oct 8, 2011]
- V4.09: Simplifying
defaults.php. [Oct 6, 2011]
- V4.08: Releasing updated translations. [Oct 4, 2011]
- V4.07: Changes to translation interface. [Sep 13, 2011]
- V4.06: Another minor bug fix. [Aug 31, 2011]
- V4.05: Documentation and admin-page display changes. Non-critical. [Aug 30, 2011]
- V4.04: Another bug fix. [Aug 29, 2011]
- V4.03: Simplifying the code, removing unused functions etc. and minor bug fixes. [Aug 25, 2011]
- V4.02: Critical bug fix. [Aug 21, 2011]
- V4.01: Minor changes to support and info links on the admin page. [Aug 7, 2011]
- V4.00: First commercial release. [July 30, 2011]
- V3.02: Documentation changes. [July 3, 2011]
- V3.01: Ensured compatibility with WordPress 3.2. [June 17, 2011]
- V3.00: Multiple translation updates and changes to default ads. [June 12, 2011]
- V2.99: Emergency bug fix. [Oct 18, 2010]
- V2.98: More translation updates and support options, and Admin interface changes. [Oct 15, 2010]
- V2.97: Suppressing ads in feeds (user request), changing default and shared ads, and translation update (
pt_PT). [Oct 2, 2010]
- V2.96: Translation updates. Minor bug fixes and enhancements. [Sep 16, 2010]
- V2.95: Documentation (FAQ) and default changes. [Aug 18, 2010]
- V2.94: More performance optimizations and minor bug fixes. [Aug 12, 2010]
- V2.93: Performance optimization, updating some translations, and changing the default and shared ads (to publicize the author's books and to include other providers). [Aug 10, 2010]
- V2.92: Major revamping of default ads: The default (and shared) ads have been changed to referral images. The text boxes on the admin page now show a reminder to generate and paste your AdSense code. [June 27, 2010]
- V2.91: Updated some translations and added a new reminder on Google policy. [May 20, 2010]
- V2.90: Updated the Russian translation. [Apr 10, 2010]
- V2.89: Updated translations (
es_ES). [Mar 20, 2010]
- V2.88: A minor fix on the number of ad blocks on a page. [Mar 6, 2010]
- V2.87: Disabling ads in feeds if header placements are chosen (bug fix). Adding warning on potential incompatibility between some header/footer position options and other WordPress widgets/plugins. [Feb 9, 2010]
- V2.86: Re-enabling header options: Above/below header options stopped working in WP2.91. Here is a fix.[Jan 30, 2010]
- V2.85: Minor bug fixes: some margin settings (on widget and link-unit) were not updating. [Jan 27, 2010]
- V2.84: New feature: Display ad blocks based on the post length. Possible bug fix: suppress RSS feeds filtering. [Jan 22, 2010]
- V2.83: Bug fix (ads on admin pages). New translation (Danish
da_DK). Updating several translations. [Dec 10, 2009]
- V2.82: Option to suppress in-line style statements so that you can use your style.css to control the ad blocks. Updating a few translations (
de_DE). [Oct 25, 2009]
- V2.81: New text wrapping options around ad blocks. Updating a few translations (
zh_CN), and releasing Norwegian (
nb_NO), and Thai (
th_TH). [Oct 14, 2009]
- V2.80: Code clean up, updated Italian and new Ukrainian (
uk_UA) translations. [Sept 24, 2009]
- V2.79: Updating some translations (
de_DE). [Sept 7, 2009]
- V2.78: More translations. Minor bug fixes (to silence
WP_DEBUGwarnings). [Sept 1, 2009]
- V2.77: French Translation, finally! [August 22, 2009]
- V2.76: Releasing new Arabic, and updated German and Indonesian translations. [Aug 19, 2009]
- V2.75: Improvements on the header and footer options. Partially switching to ClickBank for the donated ad slots. Releasing more translations. [August 10, 2009]
- V2.73: A long overdue option for putting ad blocks near the header and footer. Preparation to use other ad providers (ClickBank for now) in the donated ad slots. [August 2, 2009]
- V2.72: A bug fix related to suppressing the search box and link units titles. [July 30, 2009]
- V2.71: Option to tweak the margins on ad-blocks, as requested by some users. [July 29, 2009]
- V2.70: New option to suppress widget titles. [July 25, 2009]
- V2.64: Releasing
pt_PTtranslation. [July 22, 2009]
- V2.63: New translation in Russian (
ru_RU). Updated translations: Portuguese (
pt_BR), Simplified Chinese (
zh_CN). [July 18, 2009]
- V2.62: Attempts to fix automatic update and install issues. Improved documentation highlighting ad space sharing. Not an essential update, but any feedback will be appreciated. [July 16, 2009]
- V2.61: Improvements to the translation tool. (English users don't need to update.) [July 14, 2009]
- V2.60: Translation tool (called Easy Translator) for internationalization. English (en_US) users will see no difference, and have no reason to update. [July 12, 2009]
- V2.59: Option to suppress ads on attachment pages. Simplified Chinese translation. [July 8, 2009]
- V2.58: Admin page enhancements. [July 2, 2009]
- V2.57: Removing min-max enforcing on ad space sharing. [June 30, 2009]
- V2.56: Fixing a typo in
is_category(). [June 26, 2009]
- V2.55: Fixing the issue with submit buttons in IE8. [June 23, 2009]
- V2.54: Providing
htmlspecialchars_decode()for compatibility with older versions of PHP. [June 23, 2009]
- V2.53: The
<div>s containing the adsense code have class names set so that they can be controlled from the theme CSS. The shared ad-slots are of the same size and show only text ads now. [June 23, 2009]
- V2.52: German translation. [June 20,2009]
- V2.51: Widgets modified to handle the new Widgets API in WP2.8+. (Fully backward compatible.) [June 13, 2009]
- V2.50: Option to suppress ads on category/tag/archive pages -- requested feature. Changing the plugin name (dropping the last "r"). Configurable ad-space sharing to support the plugin development. [June 12, 2009]
- V2.41: Option to change the mouse-over border color and width for the ad blocks. Also, option to enable mouse-over decoration for the sidebar widget and link units. [June 6, 2009]
- V2.40: Major improvements on the admin page. Sponsored links on the admin page. Adding a requested Feature: Option to suppress ad blocks in front page/home page. [May 29, 2009]
- V2.38: Fixing a but that prevented the Google search title from being displayed. [May 22, 2009]
- V2.37: Belarusian translation. [May 11, 2009]
- V2.36: Turkish translation. [May 4, 2009]
- V2.35: Added some HTML comments in the page with version number and ad block sequence number for easy trouble shooting. [May 1, 2009]
- V2.34: A new option to put a border around the ad blocks as a mouse over decoration. [April 28, 2009]
- V2.33: More fixes to finally make the admin page totally "Valid XHTML 1.0 Transitional." Also releasing translation in Bahasa Indonesia [April 17, 2009]
- V2.32: Minor bug fixes related to W3 Validation. [April 13, 2009]
- V2.31: Updating some language files and correcting minor SVN commit errors. [April 12, 2009]
- V2.26: An option to show ads only in blog posts (and not on pages). [April 9, 2009]
- V2.25: More robust handling of internationalization. [April 4, 2009]
- V2.24: Releasing in Italian, revising Spanish. [April 3, 2009]
- V2.23: Releasing in Portuguese. [March 29, 2009]
- V2.22: Releasing in Spanish and French. [March 28, 2009]
- V2.21: Internationalization -- second pass with my own localization in francais (pathetic though the translation is). [March 26, 2009]
- V2.20: Internationalization (I18n) -- first pass. [March 26, 2009]
- V2.11: Bug fix: the plugin wasn't gracefully handling posts with no custom fields. [March 10, 2009]
- V2.10: Adding more control over displaying AdSense blocks in individual posts/pages. [March 8, 2009]
- V2.01: An option to prioritize the sidebar widget when enforcing the Google policy of not more than three ad blocks. [March 3, 2009]
- V2.00: [Feb 22, 2009]
- New widget for Link units.
- Complete revamping of the settings page, including an option to reload default settings.
- Coding improvements, including separating the HTML of the setting page from the PHP file.
- Ability to center ad blocks. [Due to this new feature, you may have to re-enter the alignment options of your existing ads if you are upgrading from an earlier version.]
- V1.82: Option to remove all back-links to my blog, by user demand. Option to force mid-text ad-block even in short posts. [Feb 15, 2009]
- V1.81: Simplifying the options on Google policy and limiting link-backs. [Feb 12, 2009]
- V1.80: An option to limit link-backs, and to show ad blocks in feeds. [Feb 7, 2009]
- V1.70: An option on Google policy -- to have two ad blocks plus the side bar widget, three ad blocks (with or without the side bar widget) or none at all. [Jan 25, 2009]
- V1.61: Restricting the "Easy AdSense by Unreal" plug only to posts and pages. [Jan 18, 2009]
- V1.60: Enforcing the Google AdSense policy of three ad blocks or less per page. [Jan 16, 2009]
- V1.50: Another sidebar widget for Google search, making this plugin a complete solution for all things AdSense-related. [Jan 7, 2009]
- V1.40: A sidebar widget. [Jan 2, 2009]
- V1.30: Theme-specific configurations saved, so that if you switch back and forth between themes, you don't have to change the settings. [Dec 28, 2008]
- V1.20: Tested with WordPress 2.7. Style modifications in the Admin-menu page to match the new WordPress. [Dec 13, 2008]
- V1.10: Use of WordPress style sheets for better look and feel integration. Coding improvements. [Dec. 7, 2008]
- V1.02: Added "Settings" link to the WP plugin page. [Nov 30, 2008]
- V1.01: Minor fix for restricting the filter to single posts. [Nov 29, 2008]
- V1.00: Initial release. [Nov 27, 2008]
Frequently Asked Questions
Why do I get a "Plugin does not have valid header" error?
This seems to be a problem with some WordPress installations. I have never been able to reproduce this error on any of my installations. I have found this on the web though.
What are the different versions of the plugin?
Easy AdSense is the freely distributed version of a premium plugin. The Pro version gives you more benefits -- lets you activate a filter to ensure that your ads show only on those pages that seem to comply with Google AdSense policies. It also lets you specify a list of computers where your ads will not be shown, in order to prevent accidental clicks on your own ads -- one of the main reasons AdSense bans you. These features will minimize your chance of getting banned. The Pro version costs $4.95, and is appropriate if you expect to make more than $100 of ad revenue from your site.
How can I contact the plugin author if I need help?
This plugin uses a paid support model in order to manage the support load. Each support ticket will be charged at $0.95 for the Lite version (and for the Pro version after a short free support period). The support ticket is valid for 48 hours, and further follow-up questions will call for a new support ticket.
I still don't get it. Porn and site block - that you already have during Asdense ad setup?
What you have in AdSense is an ability to block ads from certain sites. For instance, if you don't like ads from my site "thulasidas.com", you can block them. What the pro version gives you is the ability to block ads to certain clients. That is, if you don't want visitors from certain IP addresses see your ads (because they may click on too many of them, getting your AdSense account banned, for instance), you can with my plugin.
Porn block also is similar -- Google lets you choose non-porn ads (I think). What my plugin does is to look at the content of your page, and block ads if it looks like a porn page. (This can happen if a spammer posts a porn kind of comment on your blog, which again may get your AdSense account banned.)
The new placement option for lead-in adsense block in the header doesn't work the way I like. Can you fix it?
Short answer: No, I couldn't figure out how to do it better.
Long answer: This option works by adding an action to a hook in WordPress. I could not find a hook that would get activated right after the
<body> tag in the generated HTML, and right after the header image is placed (and before the sidebars are inserted). If you know the hook names, please let me know. Also, if your theme has "side" bars near the header and footer (north and south sidebars), there may be conflicts between
add_action hooks resulting in unexpected behavior.
Note that the
Below Header and
End of Page options are hacks that may not be compatible with the WordPress default widget for
Recent Posts or anything else that may use DB queries or loops. If you have problems with your sidebars and/or font sizes, please choose some other
I get the error "Error locating or loading the defaults! Ensure 'defaults.php' exists, or reinstall the plugin." What to do?
Please copy all the files in the zip archive to your plugin directory. The zip archive
easy-adsense.?.??.zip contains the directories
easy-adsense/lang. You need all the files in the
easy-adsense directory. One of these files is the missing
lang directory, on the other hand, is optional and is meant for international users.
How can I control the appearance of the adsense using CSS?
<div>s that Easy AdSense creates have the class attribute
adsense. Furthermore, they have class attributes like
adsense-lu depending on the type. You can set the style for these classes in your theme
style.css to control their appearance.
Why does my AdSense code disappear when I switch to a new theme?
One of my motivations in writing Easy AdSense was the fact that every time I switched between themes, I had to regenerate the AdSense code to match my new colors. Since I often switched back to the original theme (when I would have to regenerate the code again), I wanted to keep the AdSense code per theme in my database. Now, with Easy AdSense activated, I can switch among my themes without worrying about the AdSense color mismatch. This is what I meant when I said, "Remembers AdSense code and your options by theme, so that you don't have to re-enter them if you play with multiple themes. [This feature provides a solution to Google's unwillingness to let you modify and customize the AdSense code -- you just store all the code variants in your blog database.]" as the most important feature of Easy AdSense.
But this unfortunately means that you do have to set the code once whenever you switch to a new theme. I suppose I could have checked your database for some other AdSense code and presented it as defaults, but such complex logic usually results in less robust programs, and pain and suffering down the road.
Can I control how the adsense blocks are formatted in each page?
Yes! Now, in V2.1+, you more options (using Custom Fields) to control adsense blocks in individual posts/pages. Add custom fields with keys like
adsense-search and with values like
no to have control how the Google adsense blocks show up in each post or page. A Custom Field
adsense with value
no suppresses all AdSense ad blocks in the post or page.
I find this easy plugin too complex with too many options. Any alternatives?
If you feel that the features of Easy AdSense are a bit too much, consider my lean and mean AdSense plugin AdSense Now!
How do I use shortcodes?
You can control the ad placements using the shortcode
[ezadsense] in your blog posts and pages (not in widgets though).
[ezadsense leadin] will insert the lead-in ad,
[ezadsense midpost] will insert the mid-post ad and
[ezadsense leadout] will insert the lead-out ad at the place where you have specified. Note that if the shortcode is given for a post/page, it has priority and will supercede auto-placements. By default, only those ads specified by the shortcode will be displayed. You can specify how the plugin handles shortcodes using the drop-down menu in the Pro area. You ca even effectively disable the plugin for the body of posts and pages, leaving the widgets unaffected.
I just activated the plugin. How come I don't see any ads in my blog?
Note that you have to generate your adsense code from Google, and paste the entire code in the text boxes, replacing the existing text. There are three main text boxes corresponding to three ad locations - Lead-in, Mid-text and Lead-out. If you don't want to use a particular location, please suppress it by selecting the appropriate option. Otherwise, the plugin will show a red box indicating where you ad would be shown.
If you just created the new Google AdSense code, it may not be active yet. Google takes about ten minutes or so before serving ads. Please try again later.
I am having a difficult time getting the middle of post ads to show. They show in some posts, but not all of them. Any possible recommendations?
The middle ads are designed to show up only on long posts (of more than 20 paragraphs). Use the option to force the mid-text ads (in v1.82+) to override this length check.
WP-PlusThis and other plugins can be installed and managed seamlessly using WP-Plus -- the next generation of WordPress, developed for the professional blogger who demand professional plugins and themes. If you are a professional plugin developer or a blogger (one who hopes to make a living out of blogging or blog-related developement), do check it out!
If you like my plugin efforts, please leave a comment using your Facebook login below.
If you need help, please use our support portal instead.