Was hopping someone could help me out? I want to display number of posts in a specific category for a specific year.
A search of the forum produced this:
<?php $count=0; $my_query = new WP_Query('cat=9&year=2011');
while ($my_query->have_posts()) :
$my_query->the_post();
$count++; endwhile;
echo $count; ?>
But it displays an incorrect number of posts, thanks.