I’m using this plugin for a school newspaper website I am working on. They also needed the ability for ads to rotate because they sell the same advertising space to multiple advertisers.
This will randomize the ad when the page is loaded, not a live rotation while the site is open. It will pick a random ad each time the page is refreshed, so users will see different ads as the changes pages on the site but it will not rotate through like an animation.
I’m not using it as a widget, I placed code in my sidebar to call a certain ad slot.
If you have for example 4 advertisers with 3 ads each you could change the settings to have 12 ad slots. Advertiser #1 will use slots 1-3, Advertiser #2 will use 4-6 and so on.
The default way to place a specific ad block into the code is <?php wp125_single_ad(num); ?>
or <?php wp125_single_ad(1); ?>
Using php’s rand() function you can generate a random number for the slot number. The rand() function allows a min and max number and returns an integer in the range you specify.
The code to place Advertiser #1’s rotating ads would be:
<?php $num = rand(1,3); wp125_single_ad($num); ?>
This will display a random ad slot in that position choosing from ad slots 1, 2, and 3. Hope this helps out. It won’t be wigetized but it gives you more control and you can still easily add the ads into the ad manager.