Title: Commenting on draft posts
Last modified: August 19, 2016

---

# Commenting on draft posts

 *  Resolved [Joost](https://wordpress.org/support/users/jberculo/)
 * (@jberculo)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/commenting-on-draft-posts/)
 * Hi all,
 * I changed my theme so that for logged in users (editor and above) all articles
   are shown on the front-end of the site. That means the future and pending posts
   too.
 * When I place a comment below a future post all goes well, but when I try to place
   a comment below a pending post, all I get is a blank page.
 * Anyone any clue?

Viewing 1 replies (of 1 total)

 *  Thread Starter [Joost](https://wordpress.org/support/users/jberculo/)
 * (@jberculo)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/commenting-on-draft-posts/#post-1164737)
 * Found the solution.
 * In wp-comments-post.php there is the following snippet:
 *     ```
       if ( empty($status->comment_status) ) {
       	do_action('comment_id_not_found', $comment_post_ID);
       	exit;
       } elseif ( !comments_open($comment_post_ID) ) {
       	do_action('comment_closed', $comment_post_ID);
       	wp_die( __('Sorry, comments are closed for this item.') );
       } elseif ( in_array($status->post_status, array('draft', 'pending') ) ) {
       	do_action('comment_on_draft', $comment_post_ID);
       	exit;
       } else {
       	do_action('pre_comment_on_post', $comment_post_ID);
       }
       ```
   
 * Just replace
    do_action(‘comment_on_draft’, $comment_post_ID); with do_action(‘
   pre_comment_on_post’, $comment_post_ID);
 * and remove the exit, and comments will be admitted.

Viewing 1 replies (of 1 total)

The topic ‘Commenting on draft posts’ is closed to new replies.

## Tags

 * [blank-page](https://wordpress.org/support/topic-tag/blank-page/)
 * [Comments](https://wordpress.org/support/topic-tag/comments/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Joost](https://wordpress.org/support/users/jberculo/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/commenting-on-draft-posts/#post-1164737)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
