WordPress.org

Ready to get started?Download WordPress

Forums

AdRotate
super cache - revisited (3 posts)

  1. phazei
    Member
    Posted 3 years ago #

    I did see a post for it here, but it was quite old.

    I noticed that "Ad Injection" had no issues with WP Super Cache, it just needs it to be placed in legacy mode and uses its 'mfunc tags'. So it must be possible with AdRotate.

    Has that been updated at all? It's been a year and a major WP version since it was last asked. I would simply use Ad Injection, but it doesn't let me track clicks on our custom ads.

    Thanks.

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

  2. phazei
    Member
    Posted 3 years ago #

    Well, I believe I got WP Super Cache to work for the widget at least.

    It's very important that "Late init" is enabled in the Super Cache advanced options or the adrotate plugin won't be loaded yet so the function will die

    In adrotate-widget.php I changed around line 46 to this:

    if($instance['type'] == "group") {
    			echo "<!--mfunc echo adrotate_group({$instance['id']}) -->";
    			echo adrotate_group($instance['id']);
    			echo "<!--/mfunc-->";
    		}

    My ads are rotating, and the cache is working. The same could be done for the section above and below it for the 'single' and 'block' areas.

    I still haven't gotten the [adrotate id=x] type tags to work yet, but I'm not using those anywhere yet.

  3. johnny_n
    Member
    Posted 3 years ago #

    Thanks for this, works great! ;-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags