Quick post count using WP_Query( $args )?
-
Trying to get a total count of all posts matching a query before running the loop. I know it’s possible to first run a loop with $i++ to tally the results, but this means running the loop twice (presumably slower).
Anyone know if there’s a quick WP_Query() parameter for getting the equivalent of a mySQL COUNT() during SELECT?
Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Quick post count using WP_Query( $args )?’ is closed to new replies.