• Resolved Robin W

    (@robin-w)


    hopefully a simple answer, I need the code to purge a single page/post within a plugin I am author of.

    so something like for post 345

    purge_page(345)

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @robin-w

    Thank you for reaching out.
    In W3TC there is a function:
    function w3tc_flush_post( $post_id, $extras = null )
    So all you need to do is to call w3tc_flush_post($post_id) on the post ID you need flushed.
    You can also use w3tc_flush_url($url) if you want to flush specific URL.
    Thanks!

    Thread Starter Robin W

    (@robin-w)

    Fantastic, thankyou for prompt and great support !!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @robin-w

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review?here. This will help us to continue offering a top-notch product to users.
    Thanks!

    Thread Starter Robin W

    (@robin-w)

    done ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘purge single post/page programatically’ is closed to new replies.