• I need to rotate out the ads on my site as well, but not using awidget due to layout, I followed the above example and used the code <?php $num = rand(1,6); wp125_single_ad($num); ?> for each of the 6 ad spots, now sometimes, I get 4 of the same ad in the spots, how do I refine this code to only display one of each advertiser but in a different spot each ? In other words I want 3 ads across and 2 rows, then Random order. The settings only allow for 2 cols.

    Here is what I did to display ads:

    <div class=”Ad-125″>
    <?php $num = rand(1,6); wp125_single_ad($num); ?>
    <?php $num = rand(1,6); wp125_single_ad($num); ?>
    <?php $num = rand(1,6); wp125_single_ad($num); ?>
    <?php $num = rand(1,6); wp125_single_ad($num); ?>
    <?php $num = rand(1,6); wp125_single_ad($num); ?>
    <?php $num = rand(1,6); wp125_single_ad($num); ?>
    </div>

    site is https://www.rceno.com Ads are on Upper Right Side

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter rsaw3rd

    (@rsaw3rd)

    Or is there a way to configure the widget to get 3 cols instead of just 1 or 2? then I could use the widget to rotate out the ads and not have to use the single ad post hardcoded into the sidebar

    Thread Starter rsaw3rd

    (@rsaw3rd)

    <<Bump>>

    In wp125_single_ad($num); the $num is the ad SLOT number, not the ad number

    Your code simple randomised which ad slot will be used for each instance, not which ad will appear per slot

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP125 Need to Rotate Ads bith out using Widget’ is closed to new replies.