Forums

[Plugin: AdRotate] Use with W3 Total Cache? (3 posts)

  1. cactuscarl
    Member
    Posted 1 month ago #

    I'm running into problems with ads rotating thanks to caching ( I read previous post on this topic too).

    In W3 Total Cache however, there's an option to exclude pages from being cached. I was thinking that I could use an iframe, I could put a URL in iframe that references a page to call the adrotate_banner() function. I would then exclude the page defined in the iframe from being cached.

    The problem I'm having is getting the code in page referenced by the iframe to work. Here's what I have (in a new at PHP so be nice):

    <?php if (function_exists("adrotate_banner")) : ?>
    	<?php echo adrotate_banner('2,6'); ?>
    <?php else : ?>
    	<?php echo "Huh?"; ?>
    <?php endif; ?>

    I'm thinking the function is out of scope and I need to use include_once or require_once to make this work.

    Any ideas?

    http://wordpress.org/extend/plugins/adrotate/

  2. jdingman
    Member
    Posted 1 month ago #

    Using an iframe should work. If you use an iframe, you won't need to exclude anything at all from W3 Total Cache since it will pull from the iframe each time no matter what.

  3. cactuscarl
    Member
    Posted 1 month ago #

    That's encouraging. Now I just need to construct my php doc correctly.
    Thanks!

Reply

You must log in to post.

About this Topic