Get number of posts
<?php //* Do NOT include the opening php tag shown above. Copy the code shown below. global $wp_query; $np = $wp_query->found_posts;