Only show comments on pages meant to show one entry, rather than any edit.php query which happens to have one result.

git-svn-id: https://develop.svn.wordpress.org/trunk@6465 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2007-12-22 07:34:14 +00:00
parent 7e06628e1b
commit 93cc3c8e10
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?
<?php
if ( 1 == count($posts) ) {
if ( 1 == count($posts) && isset( $_GET['p'] ) ) {
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
if ($comments) {