Custom Query num_rows returns wrong amount
If you want the total count of all the published posts in a particular category you can try this. $all_posts = new WP_Query( array( ‘posts_per_page’ => -1, ‘post_status’ => ‘publish’, ‘cat’ => 3 ) ); echo $all_posts->post_count; or $all_posts = new WP_Query( array( ‘posts_per_page’ => -1, ‘post_status’ => ‘publish’, ‘category_name’ => ‘uncategorized’ ) ); echo … Read more