Title: comment_form when comments disabled
Last modified: August 18, 2016

---

# comment_form when comments disabled

 *  [ear1grey](https://wordpress.org/support/users/ear1grey/)
 * (@ear1grey)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/comment_form-when-comments-disabled/)
 * I’m hoping there is a filter which is called when comments are disabled. i.e.
   something similar to “comment_form” that is fired at the same point in the page
   generation, so that a plugin can add an explanation of why there is no comment
   form.
 * wp_footer is too late because the sidebar is generated between the comments and
   the footer… there must be something handy that I’ve missed…
 * Looking at the comments.php script I’ve manually added:
    do_action(‘comment_end’,
   $post->ID);
 * …which does the trick, but am I missing an official hook?

Viewing 1 replies (of 1 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/comment_form-when-comments-disabled/#post-466968)
 * There’s a `comment_closed` hook in the API (like `comment_form` it receives a
   post’s ID as a parameter). Sound like what you’re looking for?

Viewing 1 replies (of 1 total)

The topic ‘comment_form when comments disabled’ is closed to new replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/comment_form-when-comments-disabled/#post-466968)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
