[wp-hackers] get total of posts NOT in selected categories

John Blackbourn johnbillion+wp at gmail.com
Wed Oct 20 14:23:05 UTC 2010


On Wed, Oct 20, 2010 at 1:26 PM, Rich ZenMaster <richzenmaster at gmail.com> wrote:
> Actually I don't need the list of posts. Just the post count.

If you fetch the posts using get_posts() as Andrew suggested you can
then count() them to get the total. The added bonus will be that the
posts are added to WordPress' object cache.


More information about the wp-hackers mailing list