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.
- Download the software from Angsuman's website .
- Unzip the script to your desktop.
- Connect to your site via FTP/SSL.
- Upload the adrotator.php script to the wp-content/plugins folder.
- Activate the plugin.
- Create a txt file (use notepad not MS Word) and call it banner.txt .
- Copy and paste the script your affiliate program gives you into the banner.txt file. Each banner ad must be on one line only.
- Save and upload the banner.txt file to your wp-content folder.
- 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.




September 6th, 2006 at 12:29 amQuote
Thanks for the document. Would you mind adding to it the final format after removing the newlines as an example?
September 6th, 2006 at 6:49 amQuote
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.
January 17th, 2007 at 4:23 amQuote
Hi, you should also try a new plugin called WPAds, that allows you to rotate any banners (including AdSense).
December 20th, 2007 at 9:03 pmQuote
very interesting. i’m adding in RSS Reader
July 15th, 2008 at 9:29 pmQuote
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
July 15th, 2008 at 9:35 pmQuote
Ok, I just found it. If anyone else wonder what code to use, you can use this:
July 17th, 2008 at 8:18 pmQuote
I see you found the final one line code in the comments area. I’ve edited the original post and included it there.