• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Tips and Tricks HQ

  • Home
  • Projects
    • All Projects
    • Simple WP Shopping Cart
    • WP Express Checkout Plugin
    • Accept Stripe Payments
    • WP Download Monitor
    • Easy HTTPS Redirection
    • WP Security and Firewall Plugin
    • WP eStore Plugin
    • WP Affiliate Platform
    • WP eMember
  • Products
    • All Products
    • Checkout
  • Support
    • Support Portal
    • Customer Only Forum
    • WP eStore Documentation
    • WP Affiliate Software Documentation
    • WP eMember Documentation
  • Contact

WordPress Plugin for Simple Google Adsense Insertion/Integration

Home » Blog » WordPress Plugin for Simple Google Adsense Insertion/Integration

Last updated: July 14, 2018

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.

Google’s Adscense policy.

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. So I wrote my own Simple Adsense Insertion Plugin for WordPress, to focus on having 1-5 Google Adsense codes saved and use them where ever I want on my site by inserting a simple shortcode to my posts, pages and sidebar.

Summary
App Category
WordPress Plugin
Software Name
Simple Google Adsense Integration
Version
1.9
Date Modified
2018-14-17
Operating System
WordPress 4.9
Requirements
WordPress 3.0 or higher
Price
USD $0
Description
A simple plugin to add Google adsense to your WordPress site
Landing Page
https://www.tipsandtricks-hq.com/wordpress-plugin-for-simple-google-adsense-insertion-170
File Format
application/zip
Download

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(); ?>

Using In-Article Ads

This plugin allows you to automatically insert adsense ad code after the 2nd paragraph of every posts. If you want to use this feature then copy and paste the ad code in the In-article Ad Code field of the settings menu of this plugin.

Adding Adsense At the End of Every Article

This plugin allows you to automatically insert ad code at the end of every article. Go to the settings menu of this plugin then enter your ad code in the Post-article Ad Code field to activate this feature.

Plugin Download

Download the Google Adsense Plugin.

Compatibility

Works with the latest version of WordPress.

Requires

Requires WordPress 4.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
  • Version 1.7 – WP 4.2 compatibility

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

Related Posts

  • Easy to use WordPress plugin for Contact Form
  • WordPress Easy Paypal Payment or Donation Accept Plugin
  • Improve Your Daily Productivity, 7 Must use Google Products!

Wordpress Plugin Google,  google adsense,  Wordpress,  Wordpress Plugin

Reader Interactions

Comments (195 responses)

  1. Charmy says:

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

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

  3. goarticles says:

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

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

  5. Halogen Oven says:

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

  6. Kelly| product reviews 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.

    Thanks!

  7. Gifts For Moms says:

    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!

  8. Oronno says:

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

  9. nicolas simpson says:

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

  10. 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! 🙂

  11. StandSuccess says:

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

  12. ShenYu says:

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

  13. 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.”

  14. admin says:

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

  15. Norm says:

    Nice plugin. Thanks.

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

  16. Diana says:

    Thanks! I will try it.

  17. alex work says:

    Precisely what I was looking for! Thanks for the awesome plugin, have been using it for two weeks and am really satisfied!

  18. Kimi says:

    Thanks for this plugin.

    I remember one of readers asked me about the best adsense wordpress plugin, and i could not give answer.

    This is because i haven’t used any plugins so far for adsense in my blog, but i will try this one, and give a review soon for my readers.

    Thanks.

  19. Justin Germino says:

    I was using the All in One AdSense and YPN plugin which seems to work well on my blogs.

  20. aa Inn says:

    Great plugin i will try in my blog soon.

  21. Dennis "DennisKnows" Marshall says:

    I definitely needed this. I spend almost an hour today trying to wrap the text around my ad and what made it hard was all that adsense coding. It messes with the eyes.

    thanx

  22. Jon says:

    I like Quick Adsense most. Easy to place adverts advert paragraphs as well as before and after content. Sorts out alignment too. Widgets are not so good, but I do not use those.

  23. Barry Halogen Oven says:

    I’ve been thinking about using Adsense on my site for a while now but I just couldn’t figure out the best way to go about it.

    Thanks to the info in this post I’m going to get to work right away & get set up with Adsense.

    Thanks

    Barry

  24. jeiboy says:

    Nice and great plugin bro. thanks for this

  25. bushra says:

    nice site

  26. ali says:

    Yes, exceptionally good plugin. I have recommended it often. A great little tutorial as well. Do you have a plans to offer up a video tutorial as well?

  27. shahbaz says:

    very good site

  28. Ivy says:

    Hi James, Yes we are working on getting video tutorials up on the site for our tutorials. But as we all know videos can take forever but they are on the way. =)

  29. James Martell@ Affiliate Marketing Training says:

    Yes, exceptionally good plugin. I have recommended it often. A great little tutorial as well. Do you have a plans to offer up a video tutorial as well?

    James

  30. Norm says:

    Great plugin. Simple and effective. Thanks.

  31. mapo says:

    There are many ways to use Ad Sense to achieve your goals.Some people are using Ad Sense to earn a great deal of money in amounts that you would not have thought was possible unless you robbed a bank.

  32. cocker says:

    Thanks for your plugin. Although you have created it to use adsense, it is also a good tool for using javascript in wordpress. Thanks.

  33. Amanda says:

    Hi admin,

    Thank you so very much for this plugin.

    I tried the most highly recommended plugin for Adsense (I won’t name it) and although it inserted the Googe Adsense ad in my sidebar, it also inserted certain other non-Google advertising badges at the beginning of my posts! Grrr!

    I deactivated it and found this one. It was a snack to use and your How-To instructions on this post are really clear and easy to follow.

    Thanks again for making this process painless.

  34. Umesh says:

    This is great help for beginners. I still remember I spent whole day to figure it out where to put google adsense to display on my blog.

  35. Kay says:

    Hi I like the clean theme of your site, the design and the ad location. I am a newbie- any tips you could give me would be much appreciated. Thanks.

    kayblogger

  36. Umesh says:

    Great plugin. Thanks.

  37. Pablo Jose Acuna says:

    Thank you for plugin !!!!

    is very, very simple and useful.

    Best regards

  38. Rock Ballads CD says:

    One thorough info I have found on this topic on the net. in order to be back soon to follow-up.

  39. admin says:

    The plugin will work fine on WordPress 2.9.2

  40. Ardiawan.com says:

    why you don’t upgrade this plugin so it’s can compatible with wordpress 2.9.2 ??

    great plugin, it’s very useful

    Thanks

  41. Umesh says:

    Thanks for the plug-ins. Plug-ins make life easy and do think about content of the page rather than programming. 🙂

    You guys rock!!!

  42. Richard says:

    This plug-in definitely has some merit for AdSense insertion. However, since you have to do PHP anyway, why not just add the AdSense code to your template pages and not have to deal with a plugin. Of course, this is my thinking but it takes a pretty good knowledge of your template.

  43. Lynn says:

    This is great. I couldn’t figure out how to add an adsense block at the top of a main page (in an Artisteer theme) without causing the sidebar to drop down. With this plugin, all I had to do was add a blank sticky post with the code inside. Presto! A large rectangle adsense block at the top of the main page, and the sidebar still in the right position. Thanks for a tremendously useful plugin.

  44. aidicard says:

    I’ve been rebuild my blog and this plugin is would be great to use… thanks 😀

  45. Il Bigliettaio says:

    There is the way to add more then three Ad Campaign?

    Thanks

  46. Oualid says:

    Thank you for the great plugin , i’m using it and fully satisfied

  47. xmizanx says:

    thanks for that info… it is really works and awesome

  48. Cheryl says:

    Well! If you look on the left side of the WordPress page, down at the bottom under “Settings”, ya see what I’ve been reading about here! I am SO sorry and feel a little silly, but I hope everybody else can find this more quickly than I did.

    THANK YOU!

  49. Cheryl says:

    Hi! From what I’ve read here, this is a super plugin that I’ve downloaded to put Adsense Ads in my blog’s sidebar. Being able to USE programs and NOT write them, I have a few remedial questions, please: What does “call the function” mean in kindergarten terms? Where do I put the google ad code, again, in kindergarten terms, please?

    I’m sorry to be such a pain. Thanks in advance for your response!

  50. yudhi says:

    hii..thank you very,,very much, its useful for newbie like me

« Older Comments
Newer Comments »

Leave a Reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Featured & Popular Articles

Video Answers to Top WordPress QuestionsWordPress Optimization Tips and Tricks for Better Performance and SpeedEssential WordPress Security Tips - Is Your Blog Protected?WordPress Simple PayPal Shopping Cart PluginTop 15 Search Engine Optimization (SEO) Techniques I Forget to DoList of the Best and Must Use WordPress PluginsHow do I Start a Blog and Make Money Online?Good Domain Name Picking Tips for Your Blog SetupFind Out Which WordPress Web Hosting Company Offers the Cheapest and Reliable Web Hosting Solution

Featured WordPress Plugins

WP Express Checkout Plugin
wordpress estore plugin
wordpress membership plugin
wordpress affiliate plugin

Recent Posts

  • How to Use Browser Developer Tools to Inspect Elements and [...]
  • Accept Donations via PayPal from Your WordPress Site Easil [...]
  • Buy Now Button Graphics for eCommerce Websites [...]
  • Subscription Button Graphics for eCommerce Websites [...]
  • Adding PayPal Payment Buttons to Your WordPress Sidebar Ea [...]

Comment & Socialize

  • @Rob, We have just released ...
    - admin
  • I installed the plugin a co ...
    - Rob
  • @Sebastian, We've released ...
    - admin
  • I've used this plugin on a ...
    - Sebastian Djupsjöbacka
  • @John, this plugin doesn't ...
    - admin

Check out our solutions

View our WordPress plugin collection and start using them on your site.

Our WordPress Solutions

Footer

Company

  • About
  • Privacy Policy
  • Terms and Conditions
  • Affiliate Login

Top WordPress Plugins

  • Simple Shopping Cart
  • PayPal Donations
  • WP Express Checkout
  • WP eStore
  • WP eMember

Blogging Tips

  • How to Start a Blog
  • Selecting a Good Domain
  • Cheap WP Hosting
  • WP Video Tutorials
  • Simple SEO Tips

Search


Keep In Touch

Copyright © 2025 | Tips and Tricks HQ