Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I would like to remove "Comments" and "Author" columns from the list of pages, and add a couple of my own "Permalink" etc.

Is this possible? Is there an appropriate hook I could use?

share|improve this question
add comment

2 Answers

To add, here's some (cleaned) example code from a project I'm working on

add_filter( 'manage_post_type_posts_columns', 'my_columns_init' );
add_action( 'manage_post_type_posts_custom_column', 'my_columns_render', 10, 2 );

function my_columns_init( $defaults ) {
    $defaults['col_name'] = 'Column Name';

    return $defaults;
function my_columns_render( $column_name, $post_id ) {
    if( $column_name == 'col_name' ) {
        //your output here
    }
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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