count number of posts (public , private , protected) by category name
Here is another flexible way to count posts: Idea: First I was going to write the SQL query directly, but then I thought it would be more flexible if we could instead just modify the SQL query generated by WP_Query() so it would only return the results count instead of post objects. Example: I’ve been … Read more