diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 312f384a79..bf004462ae 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -789,6 +789,9 @@ function get_comment_pages_count( $comments = null, $per_page = null, $threaded if ( empty($comments) ) return 0; + if ( ! get_option( 'page_comments' ) ) + return 1; + if ( !isset($per_page) ) $per_page = (int) get_query_var('comments_per_page'); if ( 0 === $per_page )