WordPress.org

Ready to get started?Download WordPress

Forums

Add user ID to Admin Users page (1 post)

  1. cartpauj
    Member
    Posted 6 years ago #

    I'm using WP 2.6 I opened users.php and copied the following code. I would like to add another column to display the users id?:

    <table class="widefat">
    <thead>
    <tr class="thead">
    	<th scope="col" class="check-column"><input type="checkbox" /></th>
    	<th><?php _e('Username') ?></th>
    	<th><?php _e('Name') ?></th>
    	<th><?php _e('E-mail') ?></th>
    	<th><?php _e('Role') ?></th>
    	<th class="num"><?php _e('Posts') ?></th>
    I'M ASSUMING I COULD ADD ANOTHER <th> HERE called ID???????
    </tr>
    </thead>
    <tbody id="users" class="list:user user-list">
    <?php
    $style = '';
    foreach ( $wp_user_search->get_results() as $userid ) {
    	$user_object = new WP_User($userid);
    	$roles = $user_object->roles;
    	$role = array_shift($roles);
    
    	$style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
    	echo "\n\t" . user_row($user_object, $style, $role);
    }
    ?>
    </tbody>
    </table>

    Any Ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags