Title: Sowing only posts with comments
Last modified: August 20, 2016

---

# Sowing only posts with comments

 *  [benlong](https://wordpress.org/support/users/benlong/)
 * (@benlong)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [benlong](https://wordpress.org/support/users/benlong/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/sowing-only-posts-with-comments/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
