How to disable the review for particular posts

To disable the review for particular posts, add this following snippet to the functions.php file of your theme or your child theme.

add_filter('wppr_is_review_active', 'custom_wppr_is_review_active', 10, 3);

function custom_wppr_is_review_active($is_active, $id, $model){
	if($id == 9) {
		$is_active = false;
	}
	if($id == 10) {
		$is_active = false;
	}
	return $is_active;
}

This will disable the reviews for posts with id 9, and 10.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.