Adding custom column in User List with custom action

Start up a new custom plugin for something like this, and add the first code below to add a custom “Actions” column, and the second function will add some link to the column for each row. add_filter( ‘manage_users_columns’, ‘new_column_user_table’ ); function new_column_user_table( $column ) { $column[‘actions’] = ‘Actions’; return $column; } add_filter( ‘manage_users_custom_column’, ‘new_column_user_table_row’, 10, … Read more

Only show authors with posts

$args = array( ‘posts_per_page’ => 1, ‘author’ => $author->ID ); $posts = new WP_Query( $args ); $count = count( $posts ); Put this right after the foreach, $count will now contain either 1 or 0, put it through an if statement to filter the output.

how to add around each author using wp_list_authors

If you require customized solution then you can use user query like this. <?php $args = array( ‘who’ => ‘authors’, ‘orderby’ => ‘display_name’ ); $wp_user_query = new WP_User_Query($args); if ( ! empty( $wp_user_query->results ) ) { foreach ( $wp_user_query->results as $user ) { echo ‘<span class=”abc”><a href=”‘ . get_author_posts_url( $user->ID ) . ‘”>’ . $user->display_name … Read more

how to randomly list 5 authors with at least 3 published posts

You could use count_many_users_posts(). $args = array( ‘exclude’ => array( 4, ), ‘fields’ => ‘ID’, ); $users = get_users( $args ); $user_posts = count_many_users_posts( $users ); foreach( $user_posts as $user => $posts ) { if( $posts < 3 ) { unset( $user_posts[$user] ); } } $user_ids = array_keys( $user_posts ); shuffle( $user_ids ); for( $i … Read more

Add gravatar to author list

Basic setup <?php $args = array( ‘orderby’ => ‘nicename’ ); $users = get_users( $args ); foreach ( $users as $user ) { $avatar = get_avatar( $user->ID, ’80’ ); echo ‘<li><a href=”‘ . $user->user_url . ‘”>’ . $avatar . ‘<br />’ . $user->display_name . ‘</a></li>’; } ?> Excluding the Admin User Either check in the foreach: … Read more