Show when each user signed up in the Users list, and click the column to sort newest or oldest first.
add_filter( 'manage_users_columns', function ( array $columns ): array {
$columns['nahnu_registered'] = 'Registered';
return $columns;
} );
add_filter( 'manage_users_custom_column', function ( string $output, string $column, int $user_id ): string {
if ( 'nahnu_registered' !== $column ) {
return $output;
}
$user = get_userdata( $user_id );
return $user ? esc_html( wp_date( get_option( 'date_format' ), strtotime( $user->user_registered ) ) ) : '';
}, 10, 3 );
add_filter( 'manage_users_sortable_columns', function ( array $columns ): array {
$columns['nahnu_registered'] = 'registered';
return $columns;
} );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
The Users screen doesn’t show when people joined, which is often the first thing you want to know when checking new sign-ups or spam accounts. This snippet adds a Registered column you can sort by.
manage_users_columns adds the column header and manage_users_custom_column fills in each row from the user’s user_registered date, formatted with your site’s date format.
manage_users_sortable_columns makes the header clickable. Mapping it to registered, a field WordPress already knows how to sort by, means no extra query code is needed.
wp_date() shows them in your site’s time zone.Go to Users. You should see a Registered column. Click its header to sort.