Is there a way to get the current taxonomy (category or tag) post count? The code i’m having is only for category
<?php
$cat = get_query_var( 'cat' );
$categories = get_categories( 'include='.$cat );
if ( $categories ) {
foreach( $categories as $category ) {
echo '' . $category->count;
}
}
?>
I guess you can do something like this:
This will give you the count of all the posts that have assigned ANY term in the Taxonomy
your_taxonomy
, which I understand is what you want…