• Hi

    How can I add a coloumn in the users table in the admin panel? The coloumn should show content of a specific proporty of the user.

    The content that I am talking about, is the value of a field that I have made with the WP-Members plugin. So maybe that coloumn is not combined with the original wordpress-fields.

    Also this value should be possible to quick-edit directly from the users table (it’s a dropdown field), so you don’t have to click on every user to edit their info individually.

    How can I do this? Thanks.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    First you need to add a column name to the table definition. Then when time comes for each table cell in that column to be output, echo the HTML for that cell. The references are for a posts table, the concept applies to user tables as well, except the filters and actions used are different. A more complete reference is found here.

    To facilitate inline edits, it’s all done with AJAX. Unfortunately, it is not currently possible to add bulk actions. If that is really important, you could define your own table by extending the WP_List_Table class, using the WP_List_User_Table as an example, defined in wp-admin/includes/class-wp-user-list-table.php.

Viewing 1 replies (of 1 total)
  • The topic ‘Add a coloumn in admin users panel’ is closed to new replies.