Configuring the WordPress Author Advertising Plugin

I just discovered the excellent Author Advertising Plugin. This plugin lets you share advertising revenue from your Google Adsense ads (or any affiliate marketing ads) with the authors of your WordPress site.

This can be a great way to grow your site as well as provide bloggers with a way to earn money from writing about what they love. You can use this plugin a number of ways. You can have authors sign up to your blog as usual, and submit their articles manually, or you can offer the same income sharing program through syndication agreement. In either case a sign up page is a good way to let people know you’re accepting articles and tell them about your profit-sharing program.

The plugin author put a lot of time into creating this plugin. If you end up using this plugin on your site, be kind and donate!
a direct donate link wouldn’t work, so donate link goes to author’s plugin page where there is a PP link at the bottom right.

Because the documentation is somewhat lacking for those less code-savvy, I’m writing this article to detail the configuration process.

The Author Advertising Plugin has several nifty features:

  • You can set the percentage of admin versus author ads for author posts/pages.
  • Each author gets their own admin page for entering the Adsense PUB-ID number and/or other ad information as defined by you on the plugin configuration page.
  • You can use the automatic ad placement feature, or if your like me and you already have your ads exactly as you want them in your theme files, you can replace these with plugin tags.
  • You can use the default configuration where authors get x% of the ad serves only on posts they’ve written, or you can also set the homepage ads to randomly display author ads too.

Installing the plugin

The installation is standard: upload to the ..wp-content/plugins/ directory of your site and activate it from your wp-admin panel.

When you go to the configuration page found under Settings>Author Advertising Config, check to make sure the new database table has been installed. If it hasn’t there will be a warning message at the top with instructions telling you the proper SQL query to run your PHPmyAdmin (or similar) database admin panel. For PHPmyAdmin this means navigating to the correct database for your WordPress site and clicking the SQL tab. Paste the query code in there and hit submit.

Configuring the Plugin

The first 6 options are pretty self explanatory.

author-advertising-plugin-steps

  1. Enter your publisher ID (see below for more options)
  2. This is the percentage of admin ads displayed on author pages
  3. Set the member level of users authorized to participate
  4. This lets authors have some revenue from non-author page ads
  5. This will be the title of the author advertising page under Dashboard
  6. Here you can enter custom text for the authors’ advertising admin page to explain to how they can enter their affiliate information

Setting up Custom Fields

This is how different author IDs get inserted into ads on their pages. We have to select a title for ‘custom field title 1’. Let’s call it ‘pubid‘. Then place your (the admin’s) PUB-ID code in the second field:
pub-id

Inserting Ad Code

author-advertising-plugin-4
Use the Ad Place text areas to enter your Adsense code. Paste the entire block of Adense code (including javascript tags) in one of these fields. Then replace the actual PUB-ID number (google_ad_client in newer Google Ads) with %pubid% like in my example to the right.

In my example I have one ad block that appears in wrapped text at the beginning of the content which I also want to be able to let authors use their own ‘ad_slot’ styling from their Google Adsense ‘ad manager’ area. So I created a second custom field called ‘ad_slot’. In the ‘ad area’ where the ad code is placed I replaced the actual ad_slot number with ‘%custom2%‘. My second ad is a larger block at the end of posts. For this one I allow author’s revenue, but not design control via the ‘ad_slot’ custom field.

In the Ad Place fields enter only one ad at a time, clicking save changes before adding another ad to a different Ad Place. It’s also a good idea to remove the extra whitespace (empty lines in the code).

Only click the Active checkbox if you want to use the automatic ad placement feature. If you already have your ads placed in your theme files DO NOT check these boxes.

Other Affiliate Networks

You can use the Custom Fields to work with any affiliate code. Just create a new custom field for the unique parts of the ad code (that will differ for each affiliate) and insert the appropriate custom field tag into your ad template as shown below.

Setting up Google Adsense with ad_slot field

If your using Adsese ads with an ad_slot
number, use the custom fields area to input this information.

Replacing ads in your theme with Author Advertising Plugin tags

Once you have your ad code entered into the Author Advertising Plugin Config page you can replace the ad code in your theme files like this:

<?php kd_template_ad(1); ?>

If you entered ad code in Ad Place 1 then you would use the value 1 (as in the example above), if Ad Place 2 you’d use 2, etc. Do this for each ad area that you are replacing with Author Advertising ads.

Additional Help

If you need help setting up this plugin you can hire the plugin author here. Or feel free to contact me.

Erin Bruce