WordPress Plugin for Simple Google Adsense Insertion/Integration
Categories: Wordpress Plugin
Easy to use WordPress plugin to insert Google Adsense to your posts, pages and sidebar by using a trigger text or calling the php function.
There are many plugins and services which can add Google Adsense to your WordPress site. However I found that even though something like Adsense Manager or Adsense Deluxe provides a lot of customizable options, it can be overwhelming and isn’t really simple enough for people who are new to WordPress or for people who simply want to insert Google Adsense to their site in a few clicks.
I found that most of the time I only use two or three types of Google Adsense units in various places and posts throughout my sites. Google’s Adsense policy mentions to not have more than three adsense block in one page anyway. That’s why I wrote my own Simple Adsense Insertion Plugin for WordPress, to focus on having 1-3 Google Adsense codes saved and use them where ever I want on my site by inserting a simple trigger text to my posts,pages and sidebar.
Sigle Google Adsense Plugin Installation
- Unzip and Upload the folder ‘WP-Simple-Adsense-Insertion’ to the ‘/wp-content/plugins/’ directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to Settings and configure the options eg. Copy and paste the Google Adsense code that you want to use.
- Add the trigger text [wp_ad_camp_1] to a post or page where u want it to appear.
Sigle Google Adsense Plugin Usage
There are two ways you can use this plugin:
1. Add one of the following shortcodes (trigger text) on a post or page
- [wp_ad_camp_1]
- [wp_ad_camp_2]
- [wp_ad_camp_3]
- [wp_ad_camp_4]
2. Call one of the functions from your theme’s template file:
- <?php echo show_ad_camp_1(); ?>
- <?php echo show_ad_camp_2(); ?>
- <?php echo show_ad_camp_3(); ?>
- <?php echo show_ad_camp_4(); ?>
Plugin Download
Download the Google Adsense Plugin.
Compatibility
Works with the latest version of WordPress.
Requires
Requires WordPress 3.0 or higher.
Donation Option
Donation option can be found on our projects page.
Change Log
- Version 1.1
- Fixed an issue whereby sometimes Google Adsense code were disappearing from the settings page in some WordPress themes.
- Version 1.2
-
- Devlin from wptheming.com added proper shortcode implementation for placing the ads (this way you don’t have to use the old filtering options anymore)
- Version 1.3
-
- Added shortcode filtering on sidebar
- Version 1.4
-
- Added shortcode filtering on widget text and excerpt
Additional Documentation
How to Add Google Adsense to the Sidebar
You can use the shortcodes (example: [wp_ad_camp_1]) in the sidebar to show Google Adsense ad in the sidebar widget. Simply ad a text widget to your sidebar and place the shortcode in there.
Alternatively, you can add Google Adsense on the sidebar using the ‘Simple Adsense Integration’ Plugin by using the following PHP function:
<?php echo show_ad_camp_1(); ?>
If you are calling the function from the theme’s template file (sidebar.php) then you are fine but there is another way to do this using the widgets which could be more practical in some cases.
1. Download and activate the Executable PHP code plugin if you don’t have it already. This plugin lets you call php functions from the widgets (it’s similar to the Text widget but it lets you execute PHP code too).
2. Go to the widgets menu and add a ‘PHP Code’ widget to the sidebar (where you want to display the Google Adsense block). Now add the following line of code and save the settings:
<?php echo show_ad_camp_1(); ?>
This will display an The Google Adesne ad that is saved in the number one textarea of this plugin.
How to Wrap Text Around a Google Adsense Block
To left align the Adsense block and wrap text around it just use the following div for the Adsense unit in HTML view:
<div style=”float: left;”>
Adsense Goes Here
</div>
To right align the Adsense block and wrap text just change “float: left;” to “float: right;”. So for an example, the following will left align the Adsense Unit that is saved in the Ad Campaign 1 box and wrap text around it.
<div style=”float: left;”>
[wp_ad_camp_1]
</div>
If you need help with this plugin or want to suggest an enhancement/feature then please let me know by leaving a comment in the comment area below.
Also, check out our list of best WordPress plugins to find out what other plugins you should be using.






#1 by June on May 1, 2013 - 1:26 pm
Love this plug in for google adsense. So easy to use.
#2 by Prince on March 27, 2013 - 10:49 am
The simplicity and straight action of this adsense plugins cannot be over-emphasize. This is really great . Thank You.
#3 by eimgur on March 17, 2013 - 12:08 pm
excellent plugin
#4 by admin on March 5, 2013 - 9:49 pm
@Jo, at the moment we have set a limit of 4 ads because we find that using more than 3 to 4 ads on a page makes it look very spammy. However, we have received a few requests to increase the number of Adsense ads you can have with this plugin. We intend to add a few more slots in a future version.
#5 by Jo on March 5, 2013 - 9:35 pm
Hi
Your plugin has made life incredibly easy for me
I just wondered, is it possible to use more than four ads or is that the maximum? Thanks x
#6 by Ivy on February 12, 2013 - 8:19 pm
@Sabrina, Yes this should work with 3.5.1.
#7 by sabrina on February 12, 2013 - 2:32 pm
will it work with 3.5.1 wp ? any body?
#8 by Abdul Rahman on January 10, 2013 - 6:52 am
Its one of the most useful WordPress Plugins for Adsense Ads management. I have no knowledge of PHP coding but still this plugin helps with the insertion of ads easily. Thanks for creating this useful plugin and offering it free of cost
#9 by Ishak on December 8, 2012 - 10:08 pm
Thanks for sharing the plugin. will try it in my blog.
#10 by Amy on December 2, 2012 - 9:59 am
Cool. I didn’t know I can actually do that one to make things simpler. I will try to insert Google adsense your way to my wordpress blog.
#11 by Arpan Das on October 23, 2012 - 3:35 am
This plugin is very useful… I tried 3-4 adsense plugins, but this one works great…
#12 by Irol Trasmonte on September 21, 2012 - 5:25 pm
I’ve been looking for the perfect Adsense Plugin for my new website and I found the answer in this Plugin. I will surely recommend this to others. The best and simplest one by far, a Million Thanks, really.
#13 by jonny supat on September 17, 2012 - 8:23 pm
This plug-in is really useful!
easy to use it. thanks
#14 by Preston on August 28, 2012 - 1:15 pm
Awesome plugin… About the only decent one that allows you to insert Adsense into PAGES and not only posts. Worth donating to this one!
#15 by zigga on August 2, 2012 - 7:28 pm
Excellent plugin.Thanks for sharing.
#16 by Fraakz on July 11, 2012 - 7:47 am
This plugin is very easy for beginners and works great. One of the most user friendly WordPress plugins available in the market thanks for sharing
#17 by Donny on March 28, 2012 - 12:38 am
This plugin works great to deliver content in ways that seem complicit with adsense’s TOS. My biggest goal is to deliver ads in a way that won’t hurt user satisfaction with my site, so thanks! I’m giving it a whirl. fingers crossed.
#18 by Killer on March 20, 2012 - 10:48 am
You fixed my broken ads problem with this plugin. thank you!!!
#19 by Nami rajput on February 8, 2012 - 2:05 am
thanks for such a wonderful tips and support and i like your website so much
#20 by Ingo on February 4, 2012 - 2:09 am
I just setup the plugin on one of my sites and it was very easy and works great. So far I have been adding AdSense code manually, but this is so much easier! Thanks for the great work!
#21 by Carol on January 12, 2012 - 7:06 pm
Just started using this plugin on my own wordpress blog, you can have a max of 3 ads per page, and its boosted my adsense clicks.
#22 by K on January 2, 2012 - 9:51 pm
Brilliant plugin .. I have never seen an adsense plugin which is SOOOO easy to use ! Well done … very well done
#23 by Tom on December 14, 2011 - 11:38 am
I spent all day working on Adsense ads, channels and putting ads on my posts. And
I just uploaded the Simple Adsense plug-in. It looks nice and easy to use.
Thanks!
#24 by google trends on December 5, 2011 - 3:07 pm
This adsense plugin is something I will be using in the future.
This will really help me allot.
#25 by Milla on November 11, 2011 - 2:57 am
Excellent plugin. Sure made my life a lot easier.
#26 by Innan on November 9, 2011 - 12:18 am
like simple and easy,I will try this plugin, thanks for sharing this great information.
#27 by Tharu on October 28, 2011 - 1:32 am
I,m new to Google adsense. But this is simple and great. Thank you
#28 by Charmy on October 2, 2011 - 4:20 am
Thanks for the great plugin, I’ve been using this for awhile and absolutely love it!
#29 by oil tanks on September 2, 2011 - 5:26 pm
I have used adsense for a while now, found this adsense plugin on Google tried it, it works nice, thanks for the post.
#30 by goarticles on August 30, 2011 - 8:18 am
Looking for different Adsense plugin, really thanks for the sharing!
#31 by folding beds on August 5, 2011 - 9:31 pm
I have used adsense for a while now, found this adsense plugin on Google tried it, it works nice, thanks for the post.
#32 by Halogen Oven on July 26, 2011 - 11:49 am
Looking for different Adsense plugin, really thanks for the sharing!
#33 by Kelly| product reviews on June 11, 2011 - 3:16 am
I spent all day working on Adsense ads, channels and putting ads on my posts. And
I just uploaded the Simple Adsense plug-in. It looks nice and easy to use.
Thanks!
#34 by Gifts For Moms on June 7, 2011 - 12:36 am
Pretty nice post. I just stumbled upon your blog and wished to say that I have truly enjoyed browsing your blog posts. After all I will be subscribing to your rss feed and I hope you write again very soon!
#35 by Oronno on June 4, 2011 - 10:56 pm
You are grate man. Your all plugins are attractive. Please give us some more excellent plugins and tips.
#36 by nicolas simpson on May 17, 2011 - 8:31 pm
i have been looking around so long for this plugin. thanks very much
#37 by Derek on April 29, 2011 - 2:55 pm
Great plugin. I also tried to use a banner ad with html, but that did not word. Will just have to hard code it!
Simple GAI makes life a bit easier, so thanks!
#38 by StandSuccess on April 6, 2011 - 3:52 pm
THANK YOU SO MUCH! Mr. Ruhul Amin
This worked like a charm and I just LOVE the easy of placing goggle ads.
#39 by ShenYu on February 4, 2011 - 10:04 pm
Thank you so much!
This plug-in is really useful!
it is just what I needt!