WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. cactuscarl
    Member
    Posted 4 years 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. Jonathan Dingman
    Member
    Posted 4 years 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 4 years ago #

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

  4. sandbergs
    Member
    Posted 3 years ago #

    what's the solution here? :)

  5. Frederick Townes
    Member
    Posted 3 years ago #

    Use fragment caching, a JavaScript based solution or iframes.

  6. sandbergs
    Member
    Posted 3 years ago #

    In case this might be useful for anyone else the solution I have settled on here is Google DFP - it's a bit more complicated than I need but it will certainly handle this issue and likely any issue I come across.

  7. Frederick Townes
    Member
    Posted 3 years ago #

    And it's free.

Topic Closed

This topic has been closed to new replies.

About this Topic