WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Dynamic content kills the page (3 posts)

  1. Firebrand_90
    Member
    Posted 1 year ago #

    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/

  2. Firebrand_90
    Member
    Posted 1 year ago #

    [ 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.

  3. PaulMighty
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.