I found this code on WPSE:
global $current_user, $post;
$args = array( 'user_id' => $current_user->ID, 'post_id' => $post->ID );
$usercomment = get_comments( $args );
if ( 1 <= count( $usercomment ) ) {
echo 'disabled';
} else {
comment_form();
}
Note: It seems to limit the number of comments per post per user.
I want to limit the number of comments per registered user per day.
I would like to be able to change the amount of comments allowed per day in the code, please.
If someone could help me with the correct code it would be very much appreciated. Also where would I put this code in the comments.php file?
Thank you.