Sowing only posts with comments
-
Hi,
I’m trying tonig a page that will show only posts that have comments. I’ve tried the following, but it’s not working. Any ideas?
Thanks
<?php get_header(); ?> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts( 'cat=-8378, -13444&orderby=comment_count&paged=' . $paged ); while (have_posts()) : the_post(); if( get_comments_number() <1) the_post(); ?> <div class="new-wrapper"> <article <?php post_class(); ?>> <div align="center"> <header class="entry-header"> <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="archive"><?php the_title(); ?> <?php if (get_comments_number() > 0): printf(' *'); endif;?></a> </h1> </div> </header>
- The topic ‘Sowing only posts with comments’ is closed to new replies.