Replies: 0
Hi,
At one part of my homepage the content changes according to the user geo-location. This is a Google map that shows the user’s current location.
The dynamic parameter for the map is the current country code (‘usa’,’gb’ etc..), retrieved from the user’s IP.
I have set this area for fragment caching, by defining the W3TC_DYNAMIC_SECURITY on my wp-config file and nesting the dynamicly created country code within a mfunc tag:
<!--mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> -->
$country_name = (function_exists('get_country_name') && get_country_name() != '')?get_country_name():'usa';
echo $country_name;
<!--/mfunc <?php echo W3TC_DYNAMIC_SECURITY; ?> -->
This works, but only for logged in users.
Any idea where did I go wrong?
Many thanks in advance.