# MemberPress: Active Memberships Column in Users

> Adds a "Memberships" column to the WordPress Users screen showing each user's active MemberPress memberships at a glance.

- Type: PHP
- Runs: Admin only
- Category: [Memberships](https://wpide.com/library/category/memberships/)
- Requires: MemberPress
- Tags: memberpress, users, admin
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/memberpress-users-membership-column/

## Code

```php
if ( ! class_exists( 'MeprUser' ) ) {
    return;
}

add_filter( 'manage_users_columns', function ( $columns ) {
    $columns['wpide_mepr'] = 'Memberships';

    return $columns;
} );

add_filter( 'manage_users_custom_column', function ( $output, $column, $user_id ) {
    if ( 'wpide_mepr' !== $column ) {
        return $output;
    }

    $member = new MeprUser( $user_id );
    $ids    = array_unique( array_map( 'intval', (array) $member->active_product_subscriptions( 'ids' ) ) );

    if ( ! $ids ) {
        return '&mdash;';
    }

    return esc_html( implode( ', ', array_map( 'get_the_title', $ids ) ) );
}, 10, 3 );
```

## Notes

Users without an active membership show a dash.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "MemberPress: Active Memberships Column in Users" 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/
