Hi Donncha,
I thought I got working, but not for 100%
My theme file includes a file and a function from that file is called later:
<!--mclude wp-content/box-cache/switch-content-home.php-->
<?php include_once( ABSPATH . 'wp-content/box-cache/switch-content-home.php' ); ?>
<!--/mclude-->
<!--mfunc showHTML()-->
<?php showHTML() ?>
<!--/mfunc-->
After the cache file is created I see exact the same code in that file (except for the file path, where the absolute path variable shows the value) Inside the included file I get different ads for a specific country.
I get the content from the showHTML() function at the moment that the page is generated, but the content is gone after the second page view.
Does this sound familiar? I tried the function a second time in a simple way using this function:
function showHTML() {
$somevar = 1;
echo ($somevar == 1) ? 'this is one' : 'this is not';
}
But in that case I get the first message only once. If I access the cache file from the browser directly, it's working. Seems like that the PHP code isn't executed when the cache file is called by WordPress.