From d0ce444aeea3a15c78ff9bbb844ea399ec6fa8e6 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 12 Dec 2008 20:08:49 +0000 Subject: [PATCH] Fix comment links when displaying first page of comments. Props johnconners. fixes #8583 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@10196 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 31b5d9b368..06d5091f13 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -833,8 +833,8 @@ function comments_template( $file = '/comments.php', $separate_comments = false } $overridden_cpage = FALSE; - if ( '' == get_query_var('cpage') && get_option('page_comments') && 'newest' == get_option('default_comments_page') ) { - set_query_var( 'cpage', get_comment_pages_count() ); + if ( '' == get_query_var('cpage') && get_option('page_comments') ) { + set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 ); $overridden_cpage = TRUE; }