How do I add a new custom column to wordpress wp-admin/edit-comments.php page ? I tried this but did not work.

add_filter( 'manage_comments_custom_column',  'add_new_columns' );
function add_new_columns($columns){
    $column_meta = array( 'reported' => 'Reported' );
    $columns = array_slice( $columns, 0, 4, true ) + $column_meta + array_slice( $columns, 6, NULL, true ); 
    return $columns;

The filter you're looking for is manage_edit-comments_columns. Here is a post detailing how to add custom columns to the edit comments section of the admin http://stv.whtly.com/2011/07/27/adding-custom-columns-to-the-wordpress-comments-admin-page/

  • okay thanks for the article. However it does not tell anything about sortable manage_edit-comments_sortable_columns – Sayed Taqui Mar 15 '15 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.