Unfortunately, query_posts does not allow you to limit the query comment_count=0 . You can do it:
query_posts( 'orderby=comment_count&order=ASC' );
But this not only displays posts with null comments, but also displays only those with zero comments.
A more attractive (but better) solution is to use a custom query that specifically restricts the query to messages with 0 comments, but that means you need to create your own loop structure (at least as far as I can tell )
global $wpdb; $query = " SELECT * FROM {$wpdb->prefix}posts WHERE {$wpdb->prefix}posts.post_type = 'post' AND {$wpdb->prefix}posts.post_status = 'publish' AND {$wpdb->prefix}posts.comment_count = 0 ORDER BY {$wpdb->prefix}posts.post_date DESC; "; $pageposts = $wpdb->get_results($query, OBJECT); <?php if ($pageposts): ?> <?php global $post; ?> <?php foreach ($pageposts as $post): ?> <?php setup_postdata($post); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> </small> <div class="entry"> <?php the_content('Read the rest of this entry Β»'); ?> </div> <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments Β»', '1 Comment Β»', '% Comments Β»'); ?></p> </div> <?php endforeach; ?> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?>
Does this know what you know?
source share