Clear home page when custom post type updates
-
Hi Hummingbird. I have a site where the home page, which is a static page and not the posts home page, has a section which displays a feed of the latest from a custom post type.
When we update the custom post types, the home page does not auto update. If I manually purge the full site cache the home page updates. I realise you have a setting that will auto purge the entire site cache on updating any posts/page etc. However, it’s a large site and do not want to purge the entire site cache everytime a change is made (which is often).
It there an option, even something to add to my theme functions to trigger a flush of just the home page on updating a particular custom post type? For example I could write a filter that gets triggered on save of my CPT – but is there an API call I can make that says “clear cache of page x”? I hope that makes sense.
Thanks
- The topic ‘Clear home page when custom post type updates’ is closed to new replies.