Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

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']  ); 

?>
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #count #custom #posts #type #basis #author
ADD COMMENT
Topic
Name
5+3 =