只需将post\\u id参数添加到get_comments
参数数组类似于:
global $current_user,$post;
$args = array(\'user_id\' => $current_user->ID,\'post_id\' => $post->ID);
$usercomment = get_comments($args);
if(count($usercomment) >= 1){
echo \'disabled\';
} else {
comment_form();
}