WordPress Plugin for Simple Google Adsense Insertion/Integration

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.

App Category
WordPress Plugin
Software Name
Simple Google Adsense Integration
Date Modified
Operating System
WordPress 4.0
WordPress 3.0 or higher
USD $0
A simple plugin to add Google adsense to your WordPress site
Landing Page
File Format

Simple Google Adsense Plugin Installation

  1. Unzip and Upload the folder ‘WP-Simple-Adsense-Insertion’ to the ‘/wp-content/plugins/’ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to Settings and configure the options eg. Copy and paste the Google Adsense code that you want to use.
  4. Add the trigger text [wp_ad_camp_1] to a post or page where u want it to appear.

Simple 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]
  • [wp_ad_camp_5]

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(); ?>
  • <?php echo show_ad_camp_4(); ?>

Plugin Download

Download the Google Adsense Plugin.


Works with the latest version of WordPress.


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
  • Version 1.5 – Added a 5th ad slot
  • Version 1.6 – WordPress 3.8 compatibility update

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 a PHP code executable plugin if you don’t have it already. This type of plugins allow you to call PHP functions from the widgets (it is 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

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;”>

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.

Found this article interesting? Subscribe to Tips and Tricks HQ

email icon rss feed icon twitter icon google plus icon

Comments (223 responses)

  1. Josh says:

    I would like to see the option to add more sections as needed. Maybe a name function out to the side of each one so we can label them within the settings page. I think more slots for ads would be great because adsense lets you create a large variety of ads and gives you many different options for various pages/posting styles. Giving the user options like this would be great!

  2. Craig says:

    I use this plugin on one of my two sites, it really works great and I REALLY wish I had used it on the other as I’m now faced with changing a bunch of pages…

    I’ll add my vote for having additional ad slots for a couple of reasons: Users might use different size and or colors of ads on pages than they do on posts. Having a variety of options is always good. Rather than using the additional slots to make a spamy page sometimes a different size ad will just fit better.

    And I “assume” this plugin could really be used as an insert anything tool (haven’t tired it as I don’t have enough slots~~), which would really be handy for use with stuff you want to change site wide periodically…

    Just my 2¢

  3. Kamal says:

    Hi there Bro, I tried this today and it works perfectly. Unlike other plugins out there that try to embed “sneakingly” authors adsense code for revenue share, this plugin has no sneaky tricks. I just LOVE the simplicity and honesty of the Author of this plugins. I would happily pay something for this plugin. Thank you very much.

  4. Eric says:

    Great plugin. Love the simplicity. It’s also the only one that I could get to work on our theme (well I stopped looking after I found yurs) :).

    Does it only do adsense or could I create an affiliate ad that I could then add to certain posts using the shortcode? I guess I could test it to find out, but even if it did work I just want to make sure there’s nothing on the backend that might be causing some unseen issue.

    Also, I copied the instruction for “how-to wrap” directly from your post. I couldn’t get it to work at first until I noticed/switched the smart quotes to the inch mark. Thought I would mention it in case anyone else has had the same issue.

  5. admin says:

    @Albert, At the moment there is a limit of 4 adsense ad. When I first created this plugin I didn’t think you would need more than that many ads (because if you use too many ads it starts to get spammy). I find that 2 or 3 nicely positioned ad can do really good (rather than slapping too many). If a few users want more than 4 ads, I will add the option for that.

  6. Albert says:

    It works fine for me. But is it possible to place more than 4 adds (different codes) on a page. Now i see [wp_ad_camp_1-4]. Is that the limit?

    Thanks in advance

  7. admin says:

    @Catherine, You don’t have to add anything in the stylesheet. You can open your theme’s “single.php” template file. Then use the code just below the title and that will show the adsense ad below the post title. Or you can use the shortcode inside your post (when you are editing a post you can insert the adsense shortcode).

  8. catherine says:

    Hi there. We would like to have a leaderboard Adsense banner across the top of our landing page (under the header).

    Our website developer charges us huge fees to keep going back to have them ad things, tweak things, etc. We are trying to do this ourselves to avoid them but we are scared we’ll mess something up.

    Would I insert this plugin in the stylesheet? We know how to insert things in the sidebar but don’t want another ad there. Our issue is inserting things in the upper part of the page. Can you advise?

  9. June says:

    Love this plug in for google adsense. So easy to use.

  10. Prince says:

    The simplicity and straight action of this adsense plugins cannot be over-emphasize. This is really great . Thank You.

  11. eimgur says:

    excellent plugin

  12. admin says:

    @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.

  13. Jo says:

    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

  14. Ivy says:

    @Sabrina, Yes this should work with 3.5.1.

  15. sabrina says:

    will it work with 3.5.1 wp ? any body?

  16. Abdul Rahman says:

    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

  17. Ishak says:

    Thanks for sharing the plugin. will try it in my blog.

  18. Amy says:

    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.

  19. Arpan Das says:

    This plugin is very useful… I tried 3-4 adsense plugins, but this one works great…

  20. Irol Trasmonte says:

    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.

  21. jonny supat says:

    This plug-in is really useful!
    easy to use it. thanks

  22. Preston says:

    Awesome plugin… About the only decent one that allows you to insert Adsense into PAGES and not only posts. Worth donating to this one!

  23. zigga says:

    Excellent plugin.Thanks for sharing.

  24. Fraakz says:

    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

  25. Donny says:

    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. :D

  26. Killer says:

    You fixed my broken ads problem with this plugin. thank you!!!

  27. Nami rajput says:

    thanks for such a wonderful tips and support and i like your website so much

  28. Ingo says:

    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!

  29. Carol says:

    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.

  30. K says:

    Brilliant plugin .. I have never seen an adsense plugin which is SOOOO easy to use ! Well done … very well done

  31. Tom says:

    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.


  32. This adsense plugin is something I will be using in the future. :D This will really help me allot. :)

  33. Milla says:

    Excellent plugin. Sure made my life a lot easier.

  34. Innan says:

    like simple and easy,I will try this plugin, thanks for sharing this great information.

  35. Tharu says:

    I,m new to Google adsense. But this is simple and great. Thank you

  36. Charmy says:

    Thanks for the great plugin, I’ve been using this for awhile and absolutely love it!

  37. oil tanks says:

    I have used adsense for a while now, found this adsense plugin on Google tried it, it works nice, thanks for the post.

  38. goarticles says:

    Looking for different Adsense plugin, really thanks for the sharing!

  39. folding beds says:

    I have used adsense for a while now, found this adsense plugin on Google tried it, it works nice, thanks for the post.

  40. Halogen Oven says:

    Looking for different Adsense plugin, really thanks for the sharing!

  41. 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.


  42. 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!

  43. Oronno says:

    You are grate man. Your all plugins are attractive. Please give us some more excellent plugins and tips.

  44. i have been looking around so long for this plugin. thanks very much

  45. Derek says:

    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! :)

  46. StandSuccess says:

    THANK YOU SO MUCH! Mr. Ruhul Amin
    This worked like a charm and I just LOVE the easy of placing goggle ads.

  47. ShenYu says:

    Thank you so much!
    This plug-in is really useful!
    it is just what I needt!

  48. Norm says:

    Thanks for the quick response. This is what I found on AdSense help

    “Generally, it is our policy to not allow Google ads to open in a new window…We also ask that you don’t modify the AdSense ad code or alter the result of clicking on an ad on your website, as such behavior violates our program policies.”

  49. admin says:

    @Norm, What happens when someone clicks on the Google Ad is controlled via your Google Adsense account.

  50. Norm says:

    Nice plugin. Thanks.

    Is there a way to have Google Adsense open in a new window instead of leaving my site?

Speak Your Mind