Adding custom post type to count in category July 2, 2022 by Tarik Billa You can use this code let me know if you are facing any issues in it. $count_posts = wp_count_posts( 'jobs' )->publish;