Reputation: 115
I trying to get all post author name how can I get all post author name in wordpress . can I get all author name who write at least one post and their permalinks
Upvotes: 0
Views: 570
Reputation: 1177
You can use list author WordPress function
<?php $args = array(
'orderby' => 'name',
'order' => 'ASC',
'number' => null,
'optioncount' => false,
'exclude_admin' => true,
'show_fullname' => false,
'hide_empty' => true,
'echo' => true,
'feed' => [empty string],
'feed_image' => [empty string],
'feed_type' => [empty string],
'style' => 'list',
'html' => true,
'exclude' => [empty string],
'include' => [empty string] ); ?>
<?php wp_list_authors( $args ); ?>
hide_empty (boolean) Do not display authors with 0 posts. Valid values: 1 (true) - default 0 (false)
Know more about this https://codex.wordpress.org/Function_Reference/wp_list_authors
Upvotes: 1
Reputation: 1713
Seems like wp_list_authors
would get you that. More details in the codex. By default it excludes users with no posts.
Upvotes: 0