Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Matt

    (@syntax53)

    So it flushes on delete, but not on “trash post.” I tried both…

    if (function_exists('w3tc_pgcache_flush_post')) {
    	function asd_w3tc_wp_trash_post( $post_id ) {
    		do_action('w3tc_pgcache_flush_post', $post_id);
    	}
    	add_action( 'wp_trash_post', 'asd_w3tc_wp_trash_post' );
    }

    and

    if (function_exists('w3tc_pgcache_flush_post')) {
    	function asd_w3tc_wp_trash_post( $post_id ) {
    		w3tc_pgcache_flush_post($post_id);
    	}
    	add_action( 'wp_trash_post', 'asd_w3tc_wp_trash_post' );
    }

    but it doesn’t seem to be flushing the front page still. any help on how I can manually call this?

    Thanks

    Thread Starter Matt

    (@syntax53)

    So this does appear to be working actually. Perhaps I wasn’t waiting long enough:

    if (function_exists('w3tc_pgcache_flush_post')) {
    	function asd_w3tc_wp_trash_post( $post_id ) {
    		w3tc_pgcache_flush_post( $post_id );
    	}
    	add_action( 'wp_trash_post', 'asd_w3tc_wp_trash_post' );
    }
    Thread Starter Matt

    (@syntax53)

    forgot to mark resolved

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Flush front page on delete post’ is closed to new replies.