Title: Adding a Field in Admin/Users
Last modified: August 19, 2016

---

# Adding a Field in Admin/Users

 *  Resolved [randyd](https://wordpress.org/support/users/randyd/)
 * (@randyd)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/adding-a-field-in-adminusers/)
 * I’m using WP 2.2.
    Logging in as administrator, on the “Authors & Users” page(
   wp-admin/users.php) my users are listed under “Users List by Role”. Then I have
   the table that holds the data of each user. The headings are ID, Username, Name,
   E-mail, Website, Actions.
 * I want to add an addition heading of “Status” and grab that data from the users(
   wp_users) table in the database. I’ve already added the field (and data) in wp_users
   that holds the data that I want to grab, but in users.php, I’m not sure how to
   do it.
 * In users.php the table that holds the heading and data starts at or near line
   375 (see code below).
 * I’ve added the heading (Status), but how would I get the new “Status” data to
   appear for each user?
 * Thanks for your help.
 * Code:
 *     ```
       <table class="widefat">
       <?php
       foreach($roleclasses as $role => $roleclass) {
       	uksort($roleclass, "strnatcasecmp");
       ?>
       <tbody>
       <tr>
       <?php if ( !empty($role) ) : ?>
       	<th colspan="8"><h3><?php echo $wp_roles->role_names[$role]; ?></h3></th>
       <?php else : ?>
       	<th colspan="8"><h3><em><?php _e('No role for this Site'); ?></h3></th>
       <?php endif; ?>
       </tr>
       <tr class="thead">
       	<th><?php _e('ID') ?></th>
       	<th><?php _e('Username') ?></th>
       	<th><?php _e('Name') ?></th>
       	<th><?php _e('E-mail') ?></th>
       	<th><?php _e('Website') ?></th>
       <th colspan="2" style="text-align: center"><?php _e('Actions') ?></th>
       <th><?php _e('Status') ?></th>
   
       </tr>
       </tbody>
       <tbody id="role-<?php echo $role; ?>"><?php
       $style = '';
       foreach ( (array) $roleclass as $user_object ) {
       	$style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
       	echo "\n\t" . user_row($user_object, $style);
       }
       ?>
   
       </tbody>
       <?php } ?>
       </table>
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [randyd](https://wordpress.org/support/users/randyd/)
 * (@randyd)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/adding-a-field-in-adminusers/#post-716589)
 * Never mind
 * I found it. It’s in admin-functions.php under the user_row function.

Viewing 1 replies (of 1 total)

The topic ‘Adding a Field in Admin/Users’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [randyd](https://wordpress.org/support/users/randyd/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/adding-a-field-in-adminusers/#post-716589)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
