hi, i'm using a post query before the loop in my index file:
<?php
$args = array(
'category_name' => 'myworks',
'showposts' => '3',
);
$the_query = new WP_Query( $args );
?>
<?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
now what i want is to display the total number of posts in the category mentioned in $args but before the loop, like this for example:
<?php
$args = array(
'category_name' => 'myworks',
'showposts' => '3',
);
$the_query = new WP_Query( $args );
?>
<div id="info"><div class="count"><p>total posts:<?php get the total posts from the category above ?></p></div></div>
<?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
any solution?