• I am using YARQ (Yet Another Random Quote plugin), and have set set up the mfunc comments around the php function call for it so it will not be affected by WP-Cache. When I load a page that has YARQ displayed, it loads fine, but if I click refresh, the quote, and everything beneath it in the sidebar, disappears, despite the mfunc comment being closed.

    Here is the code in my sidebar for YARQ:

    <!--mfunc yarq_display()--><?php if (function_exists('yarq_display')) { yarq_display(); } ?><!--/mfunc-->

    Did I do something wrong? Does anyone know why this is happening?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Stefanie

    (@focusorganic)

    Anyone?

    Bump.

    I’m having the same issue and would also appreciate any suggestions.

    I am having a similar issue. Has anyone successfully implemented mfunc around some dynamic content with wp-cache enabled?

    Hi, the problem is that you have to put a blank space before “mfunc” and “/mfunc” and after them. Like this:

    <!– mfunc yarq_display() –><?php if (function_exists(‘yarq_display’)) { yarq_display(); } ?><!– /mfunc –>

    I think this should resolve the problem ??

    The wp-cache readme file is misleading on this, which is a bit silly.

    AH – if you put spaces into the comments, as suggested by the RockeR, then I think all that does is turn the mcfunc comments into normal comments (i.e. stops wp-cache parsing them at all).

    However, I’ve just managed to get this working, and it seems the solution (for me) was to make sure the functions I was calling are loaded BEFORE wp-cache, which I achieved by moving them to the bottom of this file:

    /wp-content/advanced-cache.php

    Cheers

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP-Cache mfunc problem’ is closed to new replies.