comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID "; if (xpress_is_wp_version('<','2.1')){ $comment_sql .= "WHERE comment_approved = '1' AND post_status = 'publish' $type_select "; } else { $comment_sql .= "WHERE comment_approved = '1' AND post_type = 'post' AND post_status = 'publish' $type_select "; } $comment_sql .= "ORDER BY comment_date_gmt DESC LIMIT $disp_count"; $comments = $wpdb->get_results($comment_sql); if ( $comments ) { $output .= '