WordPress.org

Forums

WP Super Cache
- Dynamic content & Cache (3 posts)

  1. Blutarsky
    Member
    Posted 4 years ago #

    I have read about the feature to disable caching of dynamic content, however, this is my particular case.

    1) I am using a custom theme, no widegts
    2) The sidebar has a custom box showing latest posts; the latest posts box is loaded in two phases:
    a) a function is called to load an array with latest posts

    <?php $news = load_posts('news', 8);?>

    b) later on in the sidebar code, data is rendered:

    <?php for ($i = 0; $i < 8; $i++){
         echo "<div class='floatleft'>
                   <a href='" . $news[$i]["permalink"] ."' rel='bookmark'>" . __($news[$i]["title"]) ."</a>";</div>";
    } ?>

    How should I enable dynamic content here? Data is loaded in a function, and rendered in the sidebar....

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 4 years ago #

    See the FAQ in the documentation, there are commands for keeping portions of the page dynamic.

  3. Blutarsky
    Member
    Posted 4 years ago #

    Ciao donncha, thanks for chiming in.
    I couldn't understand reading the faq if you can only use achieve dynamic content using a single call function or you you can enclose multiple code lines between the WP Superchace tags....

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Super Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic