WordPress Plugin for Simple Google Adsense Insertion / Integration

WordPress Plugin for Simple Google Adsense Insertion / Integration

Using the WordPress plugin is easy to use to trigger Google Postings in your post, page and sidebar by using trigger text or by calling php function.

There are many plugins and services that can add Google Adsense to your WordPress site. Although I came to know that even though some of the many customization options such as AdSense, this can be overwhelming and not really easy for those people who are new to WordPress or who are easily Google Want to put adsense in a few clicks on the site?

I found that most of the time I use only two or three types of Google AdSense units in different places and posts on my site. Google’s AdSense policy mentions that there are no more than three adsense blocks in any page. This is why I wrote my own simple Adsense Insertion plugin for WordPress, to focus on saving 1-3 Google Adsense code and putting a simple trigger text in my post, page and sidebar, wherever I am I can use them on the site.


App category – WordPress plugin

Software name – Simple Google Adsense Integration

Edition – 1.4

Date modified – 2014-09-05

Operating System – WordPress 4.0

Requirements – WordPress 3.0 or higher

Value – $ 0 USD

Description – A simple plugin for adding Google Adsense to your WordPress site

File format – Application / zip

Download – Simple Google Adsense Plugin Installation

Unzip and upload the folder ‘WP-Simple-Adsense-Insertion’ to the ‘wp-content / plugins /’ directory.

  1. Activate the plugin through the ‘Plugins’ menu in WordPress.
  2. Go to Settings and configure options e.g. Copy and paste the Google AdSense code that you want to use.
  3. Add the trigger text [wp_ad_camp_1] to the post or page where you want it to appear.


Simple Google Adsense Plugin Usage

There are two ways to use this plugin:

  1. Add one of the following Shortcodes (Trigger Text) to a Post or Page
  • [wp_ad_camp_1]
  • [wp_ad_camp_2]
  • [wp_ad_camp_3]
  • [wp_ad_camp_4]
  • [wp_ad_camp_5]
  1. 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 (); ?>

Download Plugin

Download the Google AdSense Plugin.

Compatibility – Works with the latest version of WordPress.

Necessary – WordPress 3.0 or higher is required.

Donation options – Donation options can be found on our project page.

Change log

  • Version 1.1 – Fixed some problems, sometimes Google Adsense code was disappearing from the settings page in some WordPress themes.
  • Version 1.2 – Developed from wptheming.com, Devlin added the appropriate short implementation to keep the ads (thus you do not have to use the old filtering options)
  • Version 1.3 – Shortcode Filtering Added to Sidebar
  • Version 1.4 – Added shortcode filtering to widget text and fraction
  • Version 1.5 – A 5th Ad Slot Added
  • Version 1.6 – WordPress 3.8 compatibility update

Additional documentation

How to add Google Adsense in the sidebar

You can use the shortcode in the sidebar (example: [wp_ad_camp_1]) to show Google AdSense ads in the sidebar widget. Just place a text widget ad on your sidebar and place a shortcode there.

Alternatively, you can add Google Adsense on the sidebar using the ‘Simple Adsense Integration’ plugin, using the following PHP function:

<? php echo show_ad_camp_1 (); ?>

If you are calling the function with the theme’s template file (sidebar.php) then you are okay but there is another way to do this using widgets which can be more practical in some cases.

  1. Download and activate a PHP code executable plugin if you do not have it already. These types of plugins allow you to call PHP functions from the widget (this is similar to the text widget, but it allows you to execute PHP code).
  2. Go to the widget menu and add a ‘PHP code’ widget to the sidebar (where you want to display Google Adsense block). Now add the following line of code and save the settings:

<? php echo show_ad_camp_1 (); ?>

This will display a Google Adesne ad which is saved in the number one texture of this plugin.

How to wrap text around a Google Adsense block

To align the adsense block and wrap the text around it, just use the following div for the AdSense unit in the HTML view:

<div style = “float: left;”>

AdSense goes here

</ Div>

Just “float: left”; to align the Adsense block and wrap text correctly. To “float: right;” Change in For example, the following AdSense unit will be aligned, which is saved in the Ad Campaign 1 box and wrap text around it

<div style = “float: left;”>


</ Div>

You please leave me a comment in the comments area below.