Clear pages after publishing post
-
Hi.
I know we already discussed this matter but I still have some issues.
Please take a look at this code
add_filter( 'swcfpc_post_related_url_init', function( $listofurls ) { $listofurls = [ site_url( '/investice/zpravy/' ), site_url( '/games/fpp/' ), site_url( '/investice/rpg/' ), site_url( '/reviews' ) ]; return $listofurls; }, 10, 1 );What I want is no matter what – if post is published normally or scheduled it should clear cache in all of these pages. I noticed that sometimes it works…sometimes it doesn’t. Don’t know why. For example in reviews – It wasn’t working properly.
Maybe I should also change something in the settings?
I know that in settings we have 2 options
Purge cache for related pages only – (recommended)
Purge whole cacheIm using the recommended one. I wish there was a third option like purge whole cache (except posts). That would be perfect..Maybe some kind of code for this?
Because in my case it’s impossible to monitor this stuff manually.
The topic ‘Clear pages after publishing post’ is closed to new replies.