Dynamic content and placeholder tag
-
Hi,
I’m trying to add some dynamic content to page, but I have problem with it. If I delete cache and refresh the page, it works fine, but after next refresh it shows placeholder instead of the dynamic content (same for next refresh).
My code is:
<h3>aa</h3> <?php define( 'TAG', 'aa' ); // Change this to a secret placeholder tag if ( TAG != '' ) { function dynamic_cache_test_safety( $safety ) { return 1; } add_cacheaction( 'wpsc_cachedata_safety', 'dynamic_cache_test_safety' ); function dynamic_cache_test_filter( &$cachedata) { return str_replace( TAG, "time" . time(), $cachedata ); } add_cacheaction( 'wpsc_cachedata', 'dynamic_cache_test_filter' ); function dynamic_cache_test_template_tag() { echo TAG; // This is the template tag } function dynamic_cache_test_init() { add_action( 'wp_footer', 'dynamic_cache_test_template_tag' ); } add_cacheaction( 'add_cacheaction', 'dynamic_cache_test_init' ); } ?>Can you help me with this problem? Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Dynamic content and placeholder tag’ is closed to new replies.