Title: Hide/remove &#8220;Leave a Reply&#8221; section
Last modified: August 19, 2016

---

# Hide/remove “Leave a Reply” section

 *  Resolved [snomead](https://wordpress.org/support/users/snomead/)
 * (@snomead)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/hideremove-leave-a-reply-section/)
 * Hi,
    I’m trying to make a plug in to protect posts with a password (but without
   wp-pass) and I can correctly hide the comments (with add_filter(‘comments_array’,’
   my-function’)) but I can’t found any filter or action to hide the form.
 * Thanks
    SnomeaD

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [snomead](https://wordpress.org/support/users/snomead/)
 * (@snomead)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/hideremove-leave-a-reply-section/#post-752420)
 * Does anybody know ?
    I want not to modify the core (like comments.php), isn’t
   any other way to do that ?
 * Thanks,
    SnomeaD
 *  Thread Starter [snomead](https://wordpress.org/support/users/snomead/)
 * (@snomead)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/hideremove-leave-a-reply-section/#post-752456)
 * Ok, I’ve manage to hide the “Leave a Reply” section with some jQuery. Not the
   best I’ve done … but it’s working 😀
 *     ```
       function myplugin_hideCommentForm($id){
   
           if(!myplugin_allowDisplay($id)){
               echo "<script type='text/javascript' charset='utf-8'>
                   jQuery(document).ready(function(){
                       jQuery('#respond').css('display','none');
                       jQuery('#commentform').css('display','none');
                       jQuery('.nocomments').css('display','block');
                   });
               </script>";
           }
       }
       add_action('comment_form','smsprotect_hideCommentForm');
       ```
   
 *  [maryandpaul](https://wordpress.org/support/users/maryandpaul/)
 * (@maryandpaul)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/hideremove-leave-a-reply-section/#post-752624)
 * After I press a post category, the posts for all that category, are displayed
   but the “Leave a Reply” section does not display until I press on the post “title”
   link. Is it possible to have the “Leave a Reply” comments section display when
   the post is originally displayed?
 * Paul
    [mabnbpdb@aol.com](https://wordpress.org/support/topic/hideremove-leave-a-reply-section/mabnbpdb@aol.com?output_format=md)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hide/remove “Leave a Reply” section’ is closed to new replies.

## Tags

 * [action](https://wordpress.org/support/topic-tag/action/)
 * [comment](https://wordpress.org/support/topic-tag/comment/)
 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [form](https://wordpress.org/support/topic-tag/form/)
 * [leave a reply](https://wordpress.org/support/topic-tag/leave-a-reply/)

 * 3 replies
 * 2 participants
 * Last reply from: [maryandpaul](https://wordpress.org/support/users/maryandpaul/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/hideremove-leave-a-reply-section/#post-752624)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
