# User ID Column in the Users List

> Adds an ID column to the Users screen, which is handy when a plugin or shortcode asks for a user ID.

- Type: PHP
- Runs: Admin only
- Category: [Users](https://wpide.com/library/category/users/)
- Tags: users, columns, id
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/user-id-column/

## Code

```php
add_filter( 'manage_users_columns', function ( $columns ) {
    $ordered = array();

    foreach ( $columns as $key => $label ) {
        $ordered[ $key ] = $label;

        if ( 'cb' === $key ) {
            $ordered['wpide_user_id'] = 'ID';
        }
    }

    if ( ! isset( $ordered['wpide_user_id'] ) ) {
        $ordered['wpide_user_id'] = 'ID';
    }

    return $ordered;
} );

add_filter( 'manage_users_custom_column', function ( $output, $column, $user_id ) {
    return 'wpide_user_id' === $column ? (string) (int) $user_id : $output;
}, 10, 3 );

add_action( 'admin_head-users.php', function () {
    echo '<style>.fixed .column-wpide_user_id{width:56px;}</style>';
} );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "User ID Column in the Users List" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
