Does anybody know how to exclude pingbacks from this query? I tried to add
AND post_type = 'comment' after
AND post_password = '' but this didn't work.
$query = "select wp_posts.*, coalesce(( select max(comment_date) from $wpdb->comments wpc where wpc.comment_post_id = wp_posts.id AND comment_approved = 1 AND post_password = '' ), wp_posts.post_date ) as mcomment_date from $wpdb->posts wp_posts where post_type = 'post' and post_status = 'publish' and comment_count > '0' order by mcomment_date desc limit $limit";
Happy New Year! Even if you might not know the answer ;-)