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?
I think manage_edit-post_type_columns and manage_posts_custom_column is what you're looking for:
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
}
}