Unfortunately you can’t just copy code that plays a completely different role and replace users
with posts
and somehow expect this to do what you want it. The reason you get a fatal error is because you’re passing in too many arguments (3) to the filter, when there are only 2 supplied.
Here’s the code to achieve what you need, if I understand you correctly:
add_filter( 'manage_posts_columns', 'column_register_wpse_101322' );
add_action( 'manage_posts_custom_column', 'column_display_wpse_101322', 10, 2 );
function column_register_wpse_101322( $columns ) {
$columns[ 'uid' ] = 'ID';
return $columns;
}
function column_display_wpse_101322( $column_name, $post_id ) {
if ( 'uid' === $column_name ) {
echo $post_id;
}
}