WordPress.org

Support

Support » Requests and Feedback » [Plugin: WP Super Cache] Custom PHP code executed before serving cache page

[Plugin: WP Super Cache] Custom PHP code executed before serving cache page

  • Hi everyone!
    I’ve been testing WP Super Cache for a while, and it’s great!

    If I can make a request, I would like the cached page to be served through a PHP page, so that I can put some code in it to be executed *every* time a page is served.
    Would this be possibile?

    Thanks in advance and greetings from Italy!

    Luca

Viewing 6 replies - 1 through 6 (of 6 total)
  • Just make sure the plugin is switched to “Half on” and use one of the cacheaction hooks to execute your code. Look in the plugins directory and at wp-cache-phase1.php for example code.

    Thank you for your reply.

    I’m not a PHP newbie, but I’m not used to work on wordpress.
    Could you be so kind as to give me an example of how to make some code be executed after each page (cached or not, excepting admin area) is executed? So far I only managed to execute the code when the cache is created.

    Thanks in advance,
    Luca

    UP

    Can anyone help me?

    Yeah, some problem here. Anyone?

    What I’m trying to do is to execute a php script every time a page is loaded. So in other words – is there a way, to – for example – not cache footer.php in the template file?

    LucaTNT – Sorry, I don’t have time to go through it.

    Pavelzin – you could use an img tag to load a php script?

    Donncha – Ok, thank you anyway.

    If any other knows how to do it, please let me know.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WP Super Cache] Custom PHP code executed before serving cache page’ is closed to new replies.
Skip to toolbar