Title: New feature : Exclude replies (patch given)
Last modified: November 12, 2016

---

# New feature : Exclude replies (patch given)

 *  [grobs38](https://wordpress.org/support/users/grobs38/)
 * (@grobs38)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/new-feature-exclude-replies-patch-given/)
 * Hi,
 * I added a new feature to your amazing plugin: ability to include or exclude replies
   to the comment list. Could you please add it to the future versions? Here are
   the diff:
 * # diff includes/widget-orig.php includes/widget.php
 *     ```
       138a139
       >               $instance['exclude_replies'] = isset( $new_instance['exclude_replies'] ) ? (bool) $new_instance['exclude_replies'] : 0;
       173c174
       < }
       \ No newline at end of file
       ---
       > }
       ```
   
 * # diff includes/form-orig.php includes/form.php
 *     ```
       113a114,120
       >                       <p>
       >                               <input id="<?php echo $this->get_field_id( 'exclude_replies' ); ?>" name="<?php echo $this->get_field_name( 'exclude_replies' ); ?>" type="checkbox" <?php checked( $instance['exclude_replies'] ); ?> />
       >                               <label for="<?php echo $this->get_field_id( 'exclude_replies' ); ?>">
       >                                       <?php _e( 'Exclude comment replies', 'comments-widget-plus' ); ?>
       >                               </label>
       >                       </p>
       >
       164c171
       < </div><!-- .cwp-form-tabs -->
       \ No newline at end of file
       ---
       > </div><!-- .cwp-form-tabs -->
       ```
   
 * # diff includes/functions-orig.php includes/functions.php
 *     ```
       111c111
       <               'status'      => 'approve'
       ---
       >         'status'      => 'approve'
       116c116,120
       <       }
       ---
       >     }
       >
       >     if ( $args['exclude_replies'] == 1 ) {
       >         $query['parent'] = '0';
       >     }
       126c130
       < }
       \ No newline at end of file
       ---
       > }
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [satrya](https://wordpress.org/support/users/satrya/)
 * (@satrya)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/new-feature-exclude-replies-patch-given/#post-8437053)
 * Thank you for the code. I’ll release it in the next version.
 * I’ve already created a github issue here [https://github.com/satrya/comments-widget-plus/issues/2](https://github.com/satrya/comments-widget-plus/issues/2)
 * Cheers,
    Satrya

Viewing 1 replies (of 1 total)

The topic ‘New feature : Exclude replies (patch given)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/comments-widget-plus_0065bd.svg)
 * [Recent Comments Widget Plus](https://wordpress.org/plugins/comments-widget-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/comments-widget-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/comments-widget-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/comments-widget-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/comments-widget-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/comments-widget-plus/reviews/)

## Tags

 * [new feature](https://wordpress.org/support/topic-tag/new-feature/)

 * 1 reply
 * 2 participants
 * Last reply from: [satrya](https://wordpress.org/support/users/satrya/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/new-feature-exclude-replies-patch-given/#post-8437053)
 * Status: not resolved