Answers for "count custom posts type basis of author"

0

count custom posts type basis of author

<?php
// get author ID
$author_id = get_the_author_meta( 'ID' ); 

// echo count for post type (post and book)
echo  count_user_posts( $author_id , ['post','book']  ); 

?>
Posted by: Guest on February-22-2022

Code answers related to "count custom posts type basis of author"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language