Hide comment form completely (preferably without using CSS)

I can think of only following ways to achieve this.

  1. There is a filter “comments_open” that check if the post whose $post_id is provided has comments open. You can use that to return false.
  2. There is another filter “comments_template” that return the template file to be used to display comment form. You can return an empty file and hence no comment form will be displayed.
  3. The other is to set the comment_status on $post object to close before comment form is displayed, it will stop theme from displaying the comment form even if they use the hardcoded comment form.

Leave a Comment