• I did everything as instructed in both plugins :

    – I checked the box in the AdRotate settings
    – I added the line to my wp-config.php
    – I checked “Late Initialization” in the W3 Total Cache settings
    – I emptied all caches

    The ads are still not rotating. What am I missing?

    Thanks in advance!
    Tijs

    P.S.: I love your plugin!! 😉

    https://wordpress.org/plugins/adrotate/

Viewing 5 replies - 1 through 5 (of 5 total)
  • How are your ads being included in your theme? Via the widget or via php code directly?

    Thread Starter moltez

    (@moltez)

    I have ads in the sidebar using the widget and ads on static pages using the shortcodes. On the homepage, there are also some ads using the php code directly.

    Not sure about the shortcodes, but for the ones in PHP code to rotate you have to enclose them in the <!-- mfunc > tags yourself in PHP.

    Thread Starter moltez

    (@moltez)

    Can you be more specific, please? I’m not a big code writer so don’t know what you’re talking about 🙂

    If you could tell me what to write in which file on what place, that woul be great! 😉

    Thx!

    Wherever you have your PHP code which is displaying your advert, such as adrotate_group(1) you should have instead:

    <!--mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> echo adrotate_group(1);--><?php echo adrotate_group(1); ?><!--/mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> -->

    Assuming of course you added W3TC_DYNAMIC_SECURITY as a define in wp_config.php.

    That might solve your issue.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘W3 Total Cache blocking ads to rotate’ is closed to new replies.