WordPress.org

Support

Support » Plugins and Hacks » WP Super Cache » Accessing Post Data within "dynamic-cached-content" area

Accessing Post Data within "dynamic-cached-content" area

  • brainbrian

    @brainbrian

    Is there a way to access the post data within a dynamic area of a cached page? I’m using the “dynamic-cached-content” to make specific areas of a template remain dynamic. The content that needs to be dynamic is custom data associated with the post based on certain parameters. I want to be able to access data from the post but just get errors trying to access it after the page is cached the first time. I assume this is because WP is not querying the post like it does by default. Is there anyway to do this?

    Simple example of what I’m trying to do…

    <!--dynamic-cached-content--><?php
    echo $post->ID;
    ?><!--
    echo $post->ID;
    --><!--/dynamic-cached-content-->

    Thanks!

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

  • The topic ‘Accessing Post Data within "dynamic-cached-content" area’ is closed to new replies.
Skip to toolbar