I used this to get User list table columns Name.

users list table

add_filter( 'manage_users_columns', array($this , 'new_modify_user_table'));

public function new_modify_user_table( $column ) {
    $column  // columns Name array , Looking for this array out side Users page

But manage_users_columns hook is not fired outside "/wp-admin/users.php", that mean It work When I am on page "/wp-admin/users.php" , but it did not Work On outside users page.

so, How do I get User table Columns Name in My plugin? or on the outside "/wp-admin/users.php"


  • how do you want to use this columns if you are not as the "Users" page. edit your question to add more details.
    – mmm
    Commented Jul 26, 2018 at 5:39
  • Dear mmm, thank you for your question. I want to create a Plugin like "Admin Columns" (wordpress.org/plugins/codepress-admin-columns) so i need to know the columns Name outside users.php.
    – javmah
    Commented Jul 26, 2018 at 5:49
  • For Dynamically add a column you have to know all the columns name, but it is Very Unusual to go to users.php to fire manage_users_columns hook every time.
    – javmah
    Commented Jul 26, 2018 at 6:08
  • Columns can be added by other plugins. They only get added when that filter runs (and when the other plugins decides - they may do it generally (all admin), or they may add the filter only if in users.php.) Thus best you can do I think is assume default columns & that your plugin is in control of rest. You could apply_filters('manage_users_columns') yourself to the default data, you might 'see' some other fields added.
    – anmari
    Commented Jul 26, 2018 at 7:10
  • this columns list in only generated in the file "wp-admin/users.php" then a idea to retrieve the list is to call this page, read the list in the filter manage_users_columns and store the list in cache.
    – mmm
    Commented Jul 26, 2018 at 8:22

1 Answer 1


Yep! solved it.

require_once( ABSPATH . 'wp-admin/includes/class-wp-users-list-table.php' ); 
$hmm = new WP_Users_List_Table( array( 'screen' => 'users' ) ); 
  • require_once( ABSPATH . 'wp-admin/includes/screen.php' ); print_r( get_column_headers('users') ) ; it will work too.
    – javmah
    Commented Jul 28, 2020 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.