List Authors For Current Category
I want to list all unique authors that have posts in the current category.
My code (location: wp-content/themes/custom-theme/category.php)
div class="container"
div class="row"
?php if ( have_posts() ) : ?
?php while( have_posts() ) : the_author(); ?
div class="col-md-2 text-center"
?php the_author_meta( 'display_name', 30 ); ?
/div
?php endwhile; ?
?php else: ?
p class="text-center"No authors/p
?php endif; ?
/div
/div
This is not giving expected result, can someone help me?
Topic list-authors loop categories posts Wordpress
Category Web