Hello. Thank you for contacting the Toolset support.
Well - you need to use custom shortcode that returns the count of posts based on current author id.
Please add following function to your current theme's functions.php file:
function func_count_author_posts() {
global $post;
$author_id = $post->post_author;
$post_type_slug = 'student'; // Replace your post type slug with 'student' word
return count_user_posts( $author_id , $post_type_slug );
}
add_shortcode( 'count_author_posts', 'func_count_author_posts' );
Where:
- Replace your post type slug with 'student' word
In your case, I don't think it need custom codes, I suggest you try to create a view for it. For example, create a postview :
1) Query posts of your custom post type
2) add a "Post author filter":
Select posts with the author the same as the page where this View is shown.
3) In section "Loop Output Editor", insider shortcode