• Resolved birdog123

    (@birdog123)


    Hey folks,

    Thanks for this plugin…I plan to donate!

    Ok, so, I have 3-4 different Blocks created with 3 separate rotating ads in each Block.

    The Blocks do have the same or similar code.

    For example:
    Block 1:
    TOP of Post Adsense code
    |rotate|
    TOP of Post Adblade code
    |rotate|
    TOP of Post Content.ad code

    then…

    Block 2:
    MIDDLE of Post Adsense code
    |rotate|
    MIDDLE of Post Adblade code
    |rotate|
    MIDDLE of Post Content.ad code

    then…

    Block 3:
    BOTTOM of Post Adsense code
    |rotate|
    BOTTOM of Post Adblade code
    |rotate|
    BOTTOM of Post Content.ad code

    So, the each of the Blocks have similar code but they are in fact different but have the same network.

    So, my question is, “is there a way to prevent duplication on the page or post when they load so the same network will not show more than one (1) time on a page or post?

    What are some potential methods or solutions?

    🙂

    https://wordpress.org/plugins/ad-inserter/

Viewing 1 replies (of 1 total)
  • Plugin Author Spacetime

    (@spacetime)

    Yes. You need to add some PHP code to check for duplicate networks.

    For example, for Adsense in block 1 define constant:

    <?php define ("ADSENSE", true); ?>
    TOP of Post Adsense code

    Then in block 2 check this constant:

    <?php if (!defined ("ADSENSE"); { ?>
    MIDDLE of Post Adsense code
    <?php } else { ?>
    MIDDLE of Post Adblade code
    <?php } ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Rotating Ads in different Blocks question’ is closed to new replies.