landbryo of Mission Lab
12/6/2019 - 4:29 PM

Example function that filters whether View Limit functionality is active based on a condition

/**
 * If current post ID is in the array then disable View Limit functionality
 */
add_filter( 'skpvl_is_active', function ( $active ) {

	global $post;

	$posts = [
		25,
		26,
		27,
		28
	];

	if ( in_array( $post->ID, $posts ) ) {
		$active = false;
	}

	return $active;

} );