Ad-Rotator is simple, yet effective ad rotation plugin for Wordpress written by Angsuman Chakraborty .  As is often the case with community written plugins, the technical docs on how to get the plugin to work are limited and somewhat confusing, specifically in regards to Google's Ad-sense program.  I was able to reach Angsuman via email and after a quick flurry of messages he was able to show me how to get Ad-Rotator working with a number of different affiliate programs, including Ad-sense.

Here are the step by step instructions to get Ad-Rotator to work.

  1. Download the software from Angsuman's website .
  2. Unzip the script to your desktop.
  3. Connect to your site via FTP/SSL.
  4. Upload the adrotator.php script to the wp-content/plugins folder.
  5. Activate the plugin.
  6. Create a txt file (use notepad not MS Word) and call it banner.txt .
  7. Copy and paste the script your affiliate program gives you into the banner.txt file.  Each banner ad must be on one line only.
  8. Save and upload the banner.txt file to your wp-content folder.
  9. Paste into your template, this is where you want the ads to be displayed, and save your changes.

Users report that getting ad-sense to work for them is a major pain.  Angsuman was able to clarify this via our email conversation.  Below is the code Google gives you to display their ads.

[code]<script type="text/javascript">< !–
google_ad_client = "pub-xxxx";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728×15_0ads_al_s";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "9C0000";
google_color_url = "9C0000";
google_color_text = "000000";
// — ></script>
<script type="text/javascript"
xsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>[/code]

The above code needs to be edited to get it to work in Ad-Rotator.  The < !–// — > need to be removed and the code needs to be on one line.

If you follow the instructions abvoe, Ad-Rotator will work like a charm for you.

Update:Download this file to see how the one line of code should look like.


7 Responses to “Wordpress Plugin: Ad-Rotator”

  1. Angsuman Chakraborty Says:

    Thanks for the document. Would you mind adding to it the final format after removing the newlines as an example?

  2. Dave Says:

    <script type="text/javascript">google_ad_client = "pub-xxxx";google_ad_width = 728;google_ad_height = 15;google_ad_format = "728×15_0ads_al_s";google_ad_channel ="";google_color_border = "FFFFFF";google_color_bg = "FFFFFF";google_color_link = "9C0000";google_color_url = "9C0000";google_color_text = "000000";</script><script type="text/javascript"xsrc="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

    Above is what the final code should look like. Copy & paste it into notepad (or your txt editor of choice) and it should show as one long line of ad code.

  3. Nick Says:

    Hi, you should also try a new plugin called WPAds, that allows you to rotate any banners (including AdSense).

  4. Melina Says:

    very interesting. i’m adding in RSS Reader

  5. Atle Says:

    Can you explain exactly what you want us to type into the template to make this plugin work? That would make this a whole lot easier for amateurs like me :)

  6. Atle Says:

    Ok, I just found it. If anyone else wonder what code to use, you can use this:

  7. Dave Says:

    Can you explain exactly what you want us to type into the template to make this plugin work? That would make this a whole lot easier for amateurs like me :)

    I see you found the final one line code in the comments area. I’ve edited the original post and included it there.

Leave a Reply

Enter this code into this box

Quote selected text