By passing orderby and order arguments in array.
$args = array(
'orderby' => 'login',
'order' => 'ASC',
);
get_users( $args );
orderby – Sort by ‘ID’, ‘login’, ‘nicename’, ’email’, ‘url’, ‘registered’, ‘display_name’, ‘post_count’, ‘include’, or ‘meta_value’ (query must also contain a ‘meta_key’ – see WP_User_Query).
More details : https://codex.wordpress.org/Function_Reference/get_users
Related Posts:
- How to change upload directory in wp_handle_upload
- What exactly does “Posts page” do in WordPress?
- How do I make my function add variables/values to the $post object?
- Calculate percentage of post by category
- Change comments form title on a page by page basis
- the_title() & the_content() are retrieving Post details inside a Page, after calling a shortcode
- register_rest_route regex option for base64 or alternate
- “Can’t use function return value in write context” error
- Displaying Only Certain Tags in Loop
- Customized title tag for each page in pagination?
- Can is_page() be combined with a switch control structure?
- is it possible to force wordpress to always save thumbnails as ‘jpg’ not ‘png’
- WordPress automatically adds tags when pasting code, how to stop it?
- ACF: Only get first row of a Repeater Field
- have_posts() execution failure
- WordPress with php 5.5 and zend opcache
- Woocommerce add to cart quantity buttons with AJAX
- How can I use wp_query to show all product data using just the products ID?
- WP add_action factory
- save imported posts as drafts
- How to show phpinfo() only in a new tab?
- Create a range slider to change font-size with different screens sizes in wordpress customizer api
- Ajax load more posts with multiple tax query
- Ajax call not working
- Are there security or other issues with changing PHP time limit and max input vars?
- Auto-Select Parent Category as Primary
- How can I pass a custom/dynamic product to the Woocommerce cart?
- Long running queries
- comments sorting incorrectly across multiple pages
- Irregular TTFB and server wait time response
- Saving plugin settings – ERROR: options page not found
- WP_Query fails despite having 1 post
- Download PDF after CF7 form submission
- 3 different times on my WordPress website
- Flexslider won’t work on WordPress
- Do I have anything to worry about when switching to a default theme to test for plugin conflictions?
- Unable to Find Space in Custom Function
- Unable to process php via shortcode
- Is it possible to create new user from external form using REST API?
- WP_Query: getting posts where custom field exists
- Foreach loop inside an array_merge
- Export Form Data to a CSV then send it as an attachment – contact form 7
- Show the section only if custom taxonomy was chosen
- How to separate categories with commas?
- Cant display an image via PHP in wordpress
- Template Loop – add switch case php
- Disable if there are no children – Woocommerce
- Alphabetically Ordered Category in WordPress
- change default RSS feed URL
- How do I make this Metabox show current DB value?
- Limit posts when visited with mobile devices
- Gravity Forms merge tags in templates?
- PHP Warning: Missing argument 2
- Image rotation issue (horizontal picture uploading as vertical) — Exif issue?
- The user can only see their own profile
- Hide a div when a custom field is empty
- Shortcode for a Series of Elevating Image Files, Excluding a Range?
- Fatal Error wp-settings.php on line 119
- How do I custom code the start page?
- what does $options = get_option(‘test_theme’); do?
- Is it possible to isolate and use WordPress functions outside of wordpress
- Remove password protection from all posts
- Testing a Form’s Zipcode Field with Regular Expressions to Determine WordPress Page Behaviour
- Adding a custom meta field with default NULL value which is not selectable
- Custom html/php/jquery map code in WordPress/elementor?
- Prevent header and footer from loading on specific pages with template or plugin
- Get taxonomy terms that share a common object property
- My Custom Post Type AJAX Query is Returning no posts – why?
- Styling a category link
- Woocommerce display orders with products from specific categories to specific admins
- How to exclude meta no index pages from wp_list_pages
- Search bar for wp menu
- Limit the number of characters/words in an excerpt for a related posts section
- Yoast Breadcrumbs Inject Multiple Levels
- Remove all feeds and return custom 404 page
- Maximum file Upload
- wp_get_nav_menu_items() with ACF
- Primary navigation menu with timed items from custom post type
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- Different Logo for Different Pages
- Deny php execution in /wp-includes – using .htaccess in /wp-includes VS root folder
- WooCommerce – Add Shipping class below each product in Shopping Cart page
- Use fetch_feed(); Totally Outside of WordPress?
- SQL Query Search page
- Unable to get Post Category Name and URL
- Create a dynamic buddupress tab
- RegExp to EXCLUDE strip HTML (FOR SOMME) comments
- Accessing external database: ERR_INCOMPLETE_CHUNKED_ENCODING
- Would it be possible to route WordPress Through an MVC Application
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- jQuery vs. $ – Creating jQuery scripts in JavaScript in WordPress using External Libraries
- When I use rewind_post() it shows menu items in my loop
- Problem using explode inside add_shortcode() callback funciton [closed]
- How to post data to a word press site in case of a mobile app
- What languages were used to build WordPress? [closed]
- How to strip/remove all blank spaces at the beginning/end of a search string
- How to create categories out of a list of words?
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- why is kses removing semicolon from inline style?
- Custom taxonomy with page post type – WordPress