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: http://svn.automattic.com/wordpress/trunk@6465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
364e809c38
commit
232980bcee
|
@ -129,7 +129,7 @@ if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?
|
||||||
|
|
||||||
<?php
|
<?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");
|
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date");
|
||||||
if ($comments) {
|
if ($comments) {
|
||||||
|
|
Loading…
Reference in New Issue