I want to count authors post count in a specific category. How do i do that? I have red this thread here but still can't fiure it out.
Count number of posts by author in a category
Edit: This is what i got and tried but doesnt work at all.
$user_id = get_the_author_meta('ID')
$args = array(
'author_name' => $user_id,
'category_name' => 'categoryname',
};
$wp_query = new WP_Query($args);
while ( $wp_query->have_posts() ) : $wp_query->the_post();
echo $my_count = $wp_query->post_count;
wp_reset_postdata();
endwhile;