Support » Plugin: WP Super Cache » Dynamic content kills the page

  • I got a random header script looks like this:

    <div id="wide-header">
    <?php
    $veg=2;
    $a=rand(1,$veg);
    putKBSlider("fejlec".$a);
    ?>
    		</div>

    If I try this:

    <div id="wide-header">
    <!--dynamic-cached-content--><?php
    $veg=2;
    $a=rand(1,$veg);
    putKBSlider("fejlec".$a);
    ?><!--/dynamic-cached-content-->
    		</div>

    Then the page wont load at all (not even with late init!)

    with mfunc the code breaks after /mfunc.

    Any idea?

    However, the dynamic content at sidebar works pretty well.

    http://wordpress.org/extend/plugins/wp-super-cache/

Viewing 2 replies - 1 through 2 (of 2 total)
  • [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <!--dynamic-cached-content--><?php
    $veg=2;
    $a=rand(1,$veg);
    putKBSlider("fejlec".$a);
    ?><!--
    $veg=2;
    $a=rand(1,$veg);
    putKBSlider("fejlec".$a);
    --><!--/dynamic-cached-content-->

    now I use this but still results in blank white screen.

    Your dynamic-cached-content markup looks correct.

    A couple things to consider…

    Are you sure that WP Super Cache is actually functional on your site? With AND without the dynamic-cached-content markup included? If you view the source for you page, do you see lines similar to the following?

    <!-- Dynamic page generated in 0.616 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2012-12-12 18:15:01 -->
    
    <!-- Compression = gzip -->

    If all that checks out, have you tried including the putKBSlider() PHP function into the dynamic-cached-content markup? I believe that all dependent code is required for the dynamic content to function correctly. I’m almost certain that any functions that exist separately will not fire.

    Good luck!
    -Paul

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dynamic content kills the page’ is closed to new replies.