If you have access to user IDs, you can use the [count_user_posts()][1] function. You would get the number of posts by a user like this: //Assume the variable $thisUser is equal to a valid user ID $ThisUserCount = count_user_posts($thisUser, 'recipe'); EDIT: Where you're calling the count_user_posts() function, you're passing it the array $args instead of the post type, 'recipe'. <?php // 1. We define the arguments to define what we want to recover $args = array ( 'post_type' => 'recipe', 'posts_per_page' => '16', ); // 2. We run the WP Query // The Query $the_query = new WP_Query ($args); // 3. we display the number of messages and the authors! // The Loop if ($the_query-> have_posts()) { echo count_user_posts(2, 'recipe'); echo 'recipes for'; echo get_the_author(2, $args); echo '<br>'; echo count_user_posts(1, 'recipe'); echo 'recipes for'; echo get_the_author(1, $args); // 3. We launch the loop to display the articles and the authors! // The Loop echo '<ul>'; while ($the_query-> have_posts()) { $the_query-> the_post(); echo '<li>'. get_the_title(). '</li>'; echo '<li>'. get_the_author(). '</li>'; } echo '</ul>'; } else { // no posts found } [1]: https://developer.wordpress.org/reference/functions/count_user_posts/