Your Query gets the authors ID and is you want them sorted Alphabetically you will need to get the author(user object) so try:
$authors = $wpdb->get_results('SELECT DISTINCT post_author FROM '.$wpdb->posts);
if($authors){
$users = get_users( array(
'include' => $authors,
'orderby' => 'display_name'
));
foreach ((array)$users as $user) {
echo '<li>' . $user->display_name. '</li>';
}
}
Related Posts:
- Display sorting options dropdown when using WooCommerce product category shortcode
- Drop down+sort blog posts date added/most popular
- What is the most efficient way to search users by their display name?
- Archive listing of posts by publish year (multiple years)
- Sortable admin column for one meta key with three possible meta values
- list posts and wrap them alphabetically A-Z
- Order posts randomly, not by date
- Nesting if statements to echo only one string based on what tag was filtered?
- Sort posts by custom fields value using dropdown menu
- How to Sort posts by Vote Count?
- Sort query_posts for Parent Pages to menue order or the count?
- How to sort posts based on the value (number) of a post’s metadata?
- Sort custom meta column by other meta value
- Sort the result of the main Query in shop page by a custom taxonomy
- Sort by page information by Ascending Numbers
- How to keep track of when a vote is cast?
- change the default order of posts only for specific categories
- Order BY Most Liked And Published Between Previous Week Monday And Next Week Monday
- How to tag the main tag? [closed]
- Removing custom sort order from admin page listing
- WordPress sorting posts by date and title using a dropdown
- How to sort (orderby) a query done by a template function before the ‘foreach’ loop?
- Array sorting assistance
- Page 2+ of taxonomy archives does not recognise sort-order from dropdown
- Query category-specific, paginated posts and allow viewer to change sort order
- Sort posts by title, sort array by largest number [duplicate]
- WordPress – show all posts + ones with specific tag
- ISOTOPE – Missing/Invalid Arguement Get Terms
- Posts sortable column not sorting properly for custom field numbers
- category & sub category order issues in wordpress
- What is wrong with my sorting logic?
- Best way to do multiple constructors in PHP
- Moving a PHP web-app to WordPress
- How to use multiple query with same meta key
- How to use WordPress (PHP) functions in AngularJS partials files?
- How to create a custom config file and get data using inline JS in a wordpress page
- How to Remove a Filter from the Admin List Table?
- Remove commas from WooCommerce checkout addresses fields
- Concatenate site_url and string doesn’t work
- Getting the dropdown menu to redirect to different pages?
- enqueue multiple Google fonts with multiple weights and styles (italic)
- How to display user nickname (not display name) in PHP template?
- Extract subdomain and relative address from a url
- Custom Template 404 for specific custom post type
- Accessing site’s root from themes folder
- Passing PHP Function Arguments from CLI vs URL
- tracking number field in Woocommerce order [closed]
- Count top level menu items
- How to complete two other input fields, completed the first
- Why ajax doesn’t work on certain wordpress hooks and reload the page instead?
- Remove the first 5 characters of the_title and orderby that
- How to add a do_action on refreshing of WP customizer?
- Replacing mysql_escape_string in a custom plugin when moving to PHP7
- running wp-cron.php using php not wget
- WordPress displaying content from sub pages
- jQuery code not working when included in functions.php
- Widgets in the loop if active
- Fatal Errors on pluggable.php
- Search form does not work in my website
- Fatal error: Call to undefined function register_new_user()
- Remove the More Link
- How to display SQL query that ran in WC_Order_Query?
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- How to display meta_value array?
- Wrap posts p tags in div
- Adding Separator to Breadcrumbs
- Update user repeater meta (ACF) with another user meta field value
- How to set post to draft and not publish if the_content contains certain words?
- Want to unrestrict plugin block
- Highlighting Text in Search Results
- Add Featured Image to Existing Post
- How to get latest post ID in functions.php?
- Billing detail page doesn’t work after I’ve changed the order of the Woocommerce navigation
- How to make a pagination with dropdown selection?
- update_post_meta not working, but values are true
- Woocommerce – get daily sales meta
- update_user_meta not working
- Custom woocommerce payment gateway – Form
- Change CSS Variable value in Theme Customizer Live Preview
- Importing the style and scripts in the plugin doesn’t work as well as in the theme
- gettint error 400 with AJAX
- Show different number of posts on first Blog listing page
- After using ssl certificate, wordpress doesn’t work
- Change username link in admin bar
- Update all posts in custom post types with wp_cron()?
- Child theme not visible in backend
- how to check if the post id has a new comment?
- How to change this internal image link parameter using PHP?
- php if, else & custom fields – syntax error
- Why isn’t my custom function kicking in from my functions.php file?
- Banner editable from backend
- Shortcoding with Divs
- Reusing the page name class that WordPress adds to body tag
- How to include support for all page types, calendar urls, archive, etc
- Query posts by custom taxonomy slug in WP REST API?
- How to disable page create for custom post type, but allow a page with the post types slug to be created?
- WooCommerce Modal Fly cart on add to cart – With AJAX
- /page/2/ redirect to 404
- How can I trim /page/ URL with PHP in WordPress
- Adding date and time to the same request