# Private Notes on Each Network Site

> Adds a "Notes" box to Network Admin > Sites > Edit Site where super admins can record the client, contract details or quirks of a site, and shows the note in the sites list.

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

## Code

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

add_action( 'network_site_info_form', function ( $blog_id ) {
    ?>
    <table class="form-table" role="presentation">
        <tr>
            <th scope="row"><label for="wpide_site_note"><?php esc_html_e( 'Notes' ); ?></label></th>
            <td><textarea name="wpide_site_note" id="wpide_site_note" rows="4" class="large-text"><?php echo esc_textarea( (string) get_site_meta( $blog_id, 'wpide_site_note', true ) ); ?></textarea></td>
        </tr>
    </table>
    <?php
} );

// Runs inside site-info.php after WordPress has checked the edit-site nonce and the manage_sites capability.
add_action( 'wp_update_site', function ( $new_site ) {
    if ( ! isset( $_POST['wpide_site_note'] ) || ! current_user_can( 'manage_sites' ) || ! is_network_admin() ) {
        return;
    }

    check_admin_referer( 'edit-site' );
    update_site_meta( $new_site->blog_id, 'wpide_site_note', sanitize_textarea_field( wp_unslash( $_POST['wpide_site_note'] ) ) );
} );

add_filter( 'wpmu_blogs_columns', function ( $columns ) {
    $columns['wpide_site_note'] = __( 'Notes' );

    return $columns;
} );

add_action( 'manage_sites_custom_column', function ( $column, $blog_id ) {
    if ( 'wpide_site_note' === $column ) {
        $note = (string) get_site_meta( $blog_id, 'wpide_site_note', true );
        echo $note ? '<span title="' . esc_attr( $note ) . '">' . esc_html( wp_trim_words( $note, 12 ) ) . '</span>' : '&mdash;';
    }
}, 10, 2 );
```

## Notes

Notes are stored in site meta and only visible in Network Admin.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Private Notes on Each Network Site" 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/
