# Site ID Column in the Network Sites List

> Adds a narrow "ID" column to Network Admin > Sites, handy when a plugin, WP-CLI command or support request asks for a blog ID.

- Type: PHP
- Runs: Admin only
- Category: [Multisite](https://wpide.com/library/category/multisite/)
- Tags: network-admin, sites, columns, id
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/ms-sites-id-column/

## Code

```php
if ( ! is_multisite() ) {
    return;
}

add_filter( 'wpmu_blogs_columns', function ( $columns ) {
    return array_slice( $columns, 0, 1, true ) + array( 'wpide_site_id' => 'ID' ) + array_slice( $columns, 1, null, true );
} );

add_action( 'manage_sites_custom_column', function ( $column, $blog_id ) {
    if ( 'wpide_site_id' === $column ) {
        echo (int) $blog_id;
    }
}, 10, 2 );

add_action( 'admin_head-sites.php', function () {
    echo '<style>.column-wpide_site_id{width:4em}</style>';
} );
```

## Notes

""

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Site ID Column in the Network Sites 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/
