WordPress.org

Support

Support » Plugins and Hacks » WP Super Cache » [Plugin: WP Super Cache] dynamic-cached-content and native wp functions

[Plugin: WP Super Cache] dynamic-cached-content and native wp functions

  • Hi! I’m having troubles with dynamic-cached-content and some wp native functions such as comments_popup_link() edit_post_link() and comments_template(). No problems with plugins functions instead.
    I’m sure the syntax is correct because with plugin functions it works, the problem is with wp native functions: the first time (when aren’t cached) they run fine, but the next time they just don’t work (no errors even in debug mode, no value is returned by the function though).

    Example (this works):

    <!–dynamic-cached-content–><?php
    sidebarlogin();
    ?><!–
    sidebarlogin();
    –><!–/dynamic-cached-content–>

    Example (this doesn’t work):

    <!–dynamic-cached-content–><?php
    edit_post_link( __( ‘Edit entry’), ‘‘);
    ?><!–
    edit_post_link( __( ‘Edit entry’), ‘‘);
    –><!–/dynamic-cached-content–>

    Thank you in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Donncha O Caoimh

    @donncha

    Unfortunately those functions only run “in the loop”. When a cached page is displayed the loop code isn’t executed so those functions don’t work.

    Thanks for the reply!
    So no workaround at all for this? 🙁
    Is it be possible to use ajax to run those functions dynamically or the outcome would be the same?

    Plugin Author Donncha O Caoimh

    @donncha

    There is, you recreate the edit links and show them to visitors with the right cookie. You just can’t use the edit_post-link() command.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Super Cache] dynamic-cached-content and native wp functions’ is closed to new replies.
Skip to toolbar