Snippets: Remove or Edit WP-admin POSTS or PAGES columns


Replace full/original-size feature image with thumbnail image in wp-admin’s POSTS listing. Place in to functions.php (as the rest below).
NOTE: replace posts with pages for the same for PAGES

//--MSC replace full-sized feature image with thumbnail image in wp-admin's POST's listing
add_filter('manage_posts_columns', 'add_img_column');
add_filter('manage_posts_custom_column', 'manage_img_column', 10, 2);

function add_img_column($columns) {
    $columns['img'] = 'Featured Image';
    return $columns;
}

function manage_img_column($column_name, $post_id) {
    if( $column_name == 'img' ) {
        echo get_the_post_thumbnail($post_id, 'thumbnail');
    }
    return $column_name;
}

Hide some unnecessary / unwanted columns:
Either see nice and simple WP-plugin Admin Columns or add this:
NOTE: see HTML source code to find TAG’s ID.name which is match for $columns[‘id’]

//--MSC hide columns in wp-admin POSTs
function my_manage_columns( $columns ) {
	unset($columns['author']);
	unset($columns['comments']);
	unset($columns['categories']);
	unset($columns['date']);
	return $columns;
}

function my_column_init() {
	add_filter( 'manage_posts_columns' , 'my_manage_columns' );
}
add_action( 'admin_init' , 'my_column_init' );