Title: WP_Post_Comments_List_Table
Published: April 25, 2014
Last modified: August 20, 2026

---

# class WP_Post_Comments_List_Table {}

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#see-also)
 * [Methods](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#methods)
 * [Source](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#wp--skip-link--target)

Core class used to implement displaying post comments in a list table.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#see-also)󠁿

 * [WP_Comments_List_Table](https://developer.wordpress.org/reference/classes/wp_comments_list_table/)

## 󠀁[Methods](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#methods)󠁿

| Name | Description | 
| [WP_Post_Comments_List_Table::display](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/display/) | – | 
| [WP_Post_Comments_List_Table::get_column_info](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/get_column_info/) | – | 
| [WP_Post_Comments_List_Table::get_per_page](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/get_per_page/) | – | 
| [WP_Post_Comments_List_Table::get_table_classes](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/get_table_classes/) | – |

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#source)󠁿

    ```php
    class WP_Post_Comments_List_Table extends WP_Comments_List_Table {

    	/**
    	 * @return array
    	 */
    	protected function get_column_info() {
    		return array(
    			array(
    				'author'  => __( 'Author' ),
    				'comment' => _x( 'Comment', 'column name' ),
    			),
    			array(),
    			array(),
    			'comment',
    		);
    	}

    	/**
    	 * @return array
    	 */
    	protected function get_table_classes() {
    		$classes   = parent::get_table_classes();
    		$classes[] = 'wp-list-table';
    		$classes[] = 'comments-box';
    		return $classes;
    	}

    	/**
    	 * @param bool $output_empty
    	 */
    	public function display( $output_empty = false ) {
    		$singular = $this->_args['singular'];

    		wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
    		?>
    <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;">
    	<tbody id="the-comment-list"
    		<?php
    		if ( $singular ) {
    			echo " data-wp-lists='list:$singular'";
    		}
    		?>
    		>
    		<?php
    		if ( ! $output_empty ) {
    			$this->display_rows_or_placeholder();
    		}
    		?>
    	</tbody>
    </table>
    		<?php
    	}

    	/**
    	 * @param bool $comment_status
    	 * @return int
    	 */
    	public function get_per_page( $comment_status = false ) {
    		return 10;
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-wp-post-comments-list-table.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/class-wp-post-comments-list-table.php#L17)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/class-wp-post-comments-list-table.php#L17-L77)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Comments_List_Table](https://developer.wordpress.org/reference/classes/wp_comments_list_table/)`wp-admin/includes/class-wp-comments-list-table.php` |

Core class used to implement displaying comments in a list table.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_post_comments_list_table/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.1.0](https://developer.wordpress.org/reference/since/3.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_post_comments_list_table%2F)
before being able to contribute a note or feedback.