You can use pre_get_users
since WP 4.0.0
function my_user_sort( $query_args ){
if( is_admin() && !isset($_GET['orderby']) ) {
$query_args->query_vars['orderby'] = 'ID';
}
return $query_args;
}
add_action( 'pre_get_users', 'my_user_sort' );
Related Posts:
- Change the Author Slug from Username to Nickname
- get_user_meta() doesn’t include user email?
- How can 2 blogs share the same users
- Different back-end language for different users?
- Migrating WordPress users into Disqus
- How to display the status of users (online – offline) in archive.php
- Remove email verification when new user register
- How to change user`s avatar?
- How to display custom user meta from registration in backend?
- Grouping users under parent user
- Check if specific username is logged in
- How to update user role without logout
- How to insert new values to WordPress user Firstname and Surname Fields via DB
- How we can get the user id by its display_name
- WP_User_Query with combined meta query – not working?
- How to change WordPress user ID?
- How to assign an additional/extra/second user-role to multiple users (of a specific user-role)
- Can I hook into the invite user process to verify their email address is from a certain domain?
- wp_insert_user is not working for me?
- How to customize wp_signon()
- Is it possible to get a user with just the password field?
- Is there any way to access Ultimate Member’s custom fields?
- How to add country drop down menu to the user profile?
- New user notification doesn’t include activation link
- Use phpbb user database for WordPress
- User ability to favorite or ‘like’ content
- Users roles, make a page belonging to multiple users
- Add custom fields to the user profile
- Undeleting a deleted user
- A way to count logged in users and display count?
- stop login if user_status equal zero
- Is it possible to get the currently logged in admin’s IP?
- Rule to redirect non logged in User to Custom Registration/login Page in .htaccess file
- How do i make my wordpress website private?
- Updating user meta
- Changing a username
- Are User Levels Still Currently Used?
- How to add a user profile page to frontend?
- Error: How to allow the “contributor” to upload media in wordpress
- Delete users from multisite after they have not logged in for a set amount of time?
- Where is the information about the authors for articles stored?
- Restrict access of admin uploads to certain logged-in users?
- how to know when the user is in specific part of the website and when he leaves that part and display the data in the admin dashboard
- Find user by nicename and open profile
- Using Cloudflare caching on wordpress with front-end user logins
- Redirect user after successful email change
- get_user_meta an ID for multiple functions
- Reset Password policy
- Which function is called after update any field of user from any where of the site
- Register user when after filling contact form
- Is possible to allow user to login with different role?
- Creating user without username and password
- Check for valid email after user inactivity?
- Custom Comment Notifications Fire on each Page Load
- The Simple and Correct Way to Add User Meta
- Export Users and their Advanced Custom Fields
- Hide hour from displaying when using user_registered
- Allow unfiltered HTML for not logged in users when saving a post
- How to copy user_nicename value into user_login
- How to check User Role and redirect to specific page according to Role when login in WordPress?
- Users – remove ‘send password’ checkbox
- Send email to all registered users [closed]
- Send clear password via mail
- How to get users by specific ID’s WordPress
- how to set default update_user_meta values wordpress
- Didn’t get array of users like in delete action WPList table in users tab
- Cannot Update user meta in custom field
- How to programmatically read the plan text password when user register?
- Get user id after save post
- Redirect user to login if not logged in, on specific pages
- Check if user is logged in via JS? [duplicate]
- I want to change my user name
- Unique password to access a section site
- Page for logged in user to Edit/Delete their own content?
- Cannot Modify Header Info Error on updating User Profile
- Is there a way to rate users instead of posts?
- Easiest way to create an user across several websites
- Is there a way to call via javascript if a user is logged-in on a static html file?
- I need a link that directs the user that is logged to his profile
- Is this a hack? WordPress Usernames of every website we have changed into one single name automatically?
- How to change default username field after login
- Post Taxonomy Value get from User Field Value
- Iterating users while user iteration is suppressed
- Custom User Page
- In admin manage users page, how can I stop users with certain privileges from editing users with other privileges?
- Browser extension to allow users to submit posts front end
- Changing the admin User Profile page
- user and usermeta table not found
- UserMeta Changes Meta Value for Post ID
- Users set passwords but cannot login
- Subscriber role – blank page
- Set user role on registration so can upload file to own media library area
- Ordering list of users by last name and then by first name
- Separate Profiles for Users
- User “none” role
- Migrating Users along with their password
- show count author post today
- Limit user access to installing/configuring a plugin?
- How to get current user ID in array meta_value?
- Increase by one the user counter on specific role