Reply To: Index page post ad injection after 2 posts

Not one for queueing up? Get faster support with AdRotate Pro!
The forum is checked a few times per week. With AdRotate Pro you can get answers faster using email support.
More private, more direct and usually a solution within a day! Learn more »

Home Forums AdRotate for WordPress Installation and Setup Index page post ad injection after 2 posts Reply To: Index page post ad injection after 2 posts

#19816

suloffdesigns
Badges:

Thank you for the explanation.

How would I be able to set a code on my archive page so that say group 23 would show after 2 posts from the top then group 29 would show up after the 4 post from the top and then group 30 would show up after 6 posts from the top.

The below code I have will show the group 29 after 4 and group 30 after 6 but will also show the 23 along with it.

Thank you for your help

<?php if ($count%2== 0) : ?>

    <div class="inpostad show-for-small-only"> <?php echo adrotate_group(23); ?></div>

<?php endif; ?>
<?php if ($count%4== 0) : ?>

    <div class="inpostad show-for-small-only"> <?php echo adrotate_group(29); ?></div>

<?php endif; ?>
<?php if ($count%6== 0) : ?>

    <div class="inpostad show-for-small-only"> <?php echo adrotate_group(30); ?></div>

<?php endif; ?>