• Resolved mapdi

    (@mapdi)


    HI there

    How can we exclude Post with a specific custom taxonomy tag from caching?

    This works in WP-Optimize. Any similiar possibility?

    add_action('wp',
    	function() {
    		if (has_term( array( 'term' ), 'taxonomy-name' ) && !defined('DONOTCACHEPAGE')) {
    			define('DONOTCACHEPAGE', true);
    		}
    	}
    );
Viewing 1 replies (of 1 total)
  • Anonymous User 16850768

    (@anonymized-16850768)

    Cache Enabler honors the DONOTCACHEPAGE constant. That means if it’s defined as true at the wp hook like you have in the example above, then Cache Enabler won’t cache that page.

Viewing 1 replies (of 1 total)
  • The topic ‘Exclude a custom taxonomy from caching’ is closed to new replies.