Support » Plugins » WP125 “Random” Ad Order Problem

  • Hi,

    The default ad placeholder seems to appear randomly on my website. I only want my active ads to appear, not the default ad placeholder. How can I fix this? Thanks!

    Here is my current WP125 setup:

    Number of Ad Slots: 4
    Number of Active Ads: 5
    Ad Order: Random

Viewing 7 replies - 1 through 7 (of 7 total)
  • nicknormal


    I too would like this resolved. The error only occurs when Ad Order is set to Random in the plugin’s settings.

    I want to put 5 ads in each slot; and have 2 slots. I don’t want to ‘default’ to appear at all. I have everything set accordingly but quite often the default image appears.

    please fix!

    Getting the same here, the default ad appears with a very high regularity when random is enabled even when there is enough active ads to cover all the slots.

    I thought it only happened if you have an uneven number of ads available for each slot, but putting the same number of ads in each slot doesn’t fix it.

    Shame 🙁

    I also, am having this problem. Would love to continue using if someone can recommend a solution

    I’m not sure if this solution will help you guys out at all. I’m not using the plugin as a widget because the site I am working on has skyscraper ad’s and block ad’s. If I use it as a widget and have it random, the ad size variance creates issues in my sidebar. I placed the code directly in the sidebar.php file. I also interpreted the random order differently as well. I assumed it meant if you had for example 4 slots it would make the slot order random instead of 1,2,3,4. When I added multiple ads to the same slot it only displayed the most recently added ad for that slot.

    Here is a workaround I came up with.

    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.

    Thanks for the information, 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); ?>

    Thanks brandonflorkey, it works perfectly! If only I could measure impressions now.

    Thank you VERY much brandonflorkey!!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP125 “Random” Ad Order Problem’ is closed to new replies.