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.


  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:

Inserting Ad Code

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.

15 Responses to “Configuring the WordPress Author Advertising Plugin”

  1. omi says:

    thanks a lot really.. again thanks

  2. donny says:

    Can you tell me where i can put channel id.?? i want my user enter there own channel to track there own ads. please admin help me

    • Interstice Solutions says:

      Donny, if you’ve setup the custom fields to capture the Channel ID, this should appear as a field in the user’s wp-admin area –under the ‘my advertising’ tab (or whatever you called it).

  3. Jay says:

    I’m just curious, shouldn’t you use %custom2% instead of %ad_slot% when you put it in the Adsense code?


    • Interstice Solutions says:

      Hey, thanks for catching that, Jay! You’re absolutely correct. I’ve updated the article with the correct information.

  4. Priyanka says:

    Hi,can u tell me this plugin can fullfilled my requirements or not
    My requirements are – i need a plugin creating (or finding) that shares the adsense revenue with the article author and with the person who refered the author to the site, as well as the site owner.

    needs to have the percentages of the share configureable from within the admin panel as well as configurable ad placements. needs to be compatible with wordpress mu.

    And how to combining two plugins in one?

    • Interstice Solutions says:

      As is , no the plugin will not meet your requirements. But it would not be too difficult to alter it to add another share of revenue for the referrer. As is, you can place your ad code via the wp-admin panel, and use widgets to place ads. It’s easy to add a widget area to any theme to create additional places where the Author Advertising widgets can go.

      If you would like more options, let me know what you have in mind and I’ll get back to you with a proposal. You might also consider contacting the plugin author.

  5. I placed an ad in the sidebar and it works fine
    but when i tryed to add another one under posts it showed me two ads
    one under the post (as i want) and another one in the header!
    how can i remove that header ad which i dont want!?

    • Interstice Solutions says:

      If you send me a link to your site I will take a look (if it’s the one your name is linked to, I don’t see / let me know when the code is activated so I can see what the problem is).

  6. sachin says:

    Is there is any way to show 3 custom fields ?
    i want to give revenue share with 3 different ads ?

    • Interstice Solutions says:

      I think you could modify the plugin, carefully look for all instances of the exisiting fields and add in another one. If you’d like me to do it, drop a line on the Contact page 😉

  7. ToughestPost says:

    How can I customize the size of the ads?

  8. Tiziana says:

    Hello Firstly I want to thank you for your guidance on the plugin author advertising that is really well done congratulations. In the last part but I have a question that I hope you can clarify. When I insert my adsense banner with colors, formatting, etc., in the banner to be generated from adsense appears

    google_ad_client (which I replaced with “% pubid% “)


    google_ad_slot. For this second I leave the number you gave me for my adsense banner or do I replace it with a variable? (PS GOOGLE AD SLOT identifies what actually ’cause I just want users to enter their pub id without them choose banner size, color, etc.). I hope you can help me thanks.


    • Interstice Solutions says:

      If you just want users to enter their PUB-ID, then in the banner code you would use your own banner code to keep control of the styling (to clarify: only use the token %pubid% in place of your PUb-ID number, but use your own ad settings for the rest of the ad code).

Leave a Reply