$args = array(
'post_type' => 'post',
'tax_query' => array(
array(
'taxonomy' => 'author',
'field' => 'slug',
'terms' => $user_login
)
),
);
$author_query = new WP_Query( $args );
$count=0;
if ( $author_query->have_posts() ) :
while ( $author_query->have_posts() ) : $author_query->the_post();
// Do your presentation
$count++;
endwhile;
endif;
echo $count;
add_action( 'um_after_profile_name_inline', 'my_after_profile_name_inline', 10 );
function my_after_profile_name_inline() {
echo "<br>";
echo get_the_author() .' '. '('. get_the_author_posts() .')';
echo "<br>";
}
add_action( 'um_after_profile_name_inline', 'my_after_profile_name_inline', 10 );
function my_after_profile_name_inline() {
echo "<br>";
$current_user_id = get_current_user_id();
echo get_the_author($current_user_id) .' '. '('. count_user_posts($current_user_id) .')';
echo "<br>";
}