Wordpress Setup:
A test install of WP 4.1 with two static pages:
- Home
- Blog
In WP Settings -> Reading:
Front page displays: A static page
Front page: Home
Posts page: Blog
So posts are accessible at http://mydomain.com/blog
There is one post - “Hello world!”.
If I edit that post, conditional purging works as expected: homepage, archives, categories and the post are correctly purged.
But the page mydomain.com/blog is not purged.
As a hack, I modified nginx-helper/purger.php:
$this->log( "Function purgePost BEGIN ===" );
if ( $rt_wp_nginx_helper->options[ 'purge_homepage_on_edit' ] == 1 ) {
$homepage_url = trailingslashit( home_url() );
$homepage_url2 = $homepage_url . 'blog/';
$this->log( "Purging homepage '$homepage_url'" );
$this->purgeUrl( $homepage_url );
$this->purgeUrl( $homepage_url2 );
}
Ugly, and will be overwritten on update, but it achieves the desired result.
Is there a WP variable or constant set when a static posts page is configured? And can purger.php be modified to act on it?