$user_id, 'status' => 'approve', 'post_status' => 'publish', 'number' => $per_page, 'offset' => ($paged - 1) * $per_page, 'orderby' => 'comment_date_gmt', 'order' => 'DESC', 'count' => true, ]); $total_comments = $comments; $comments = get_comments([ 'user_id' => $user_id, 'status' => 'approve', 'post_status' => 'publish', 'number' => $per_page, 'offset' => ($paged - 1) * $per_page, 'orderby' => 'comment_date_gmt', 'order' => 'DESC', ]); $max_pages = ceil($total_comments / $per_page); ?>