get_results("SELECT DISTINCT comment_count,ID,post_title FROM wp_posts AS wpost INNER JOIN wp_term_relationships ON wpost.ID = wp_term_relationships.object_id INNER JOIN wp_term_taxonomy ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id AND wp_term_taxonomy.taxonomy = 'category' WHERE not wp_term_taxonomy.term_id IN (41) AND post_status = 'publish' ORDER BY `post_date` DESC LIMIT 0 , 4"); foreach ($result as $post) { setup_postdata($post); $postid = $post->ID; $title = $post->post_title; $commentcount = $post->comment_count; if ($commentcount != 0) { ?>