Output post count per category on a custom taxonomy archive
-
My website has a taxonomy
artists
, under whichartist names
serve as terms. I’m on a taxonomy term archive for an artist. I am already able to display posts that belong to the current term. I put as<div>
the following:Album reviews
EP reviews
Track reviews
Interviews
I want these to display the number of posts that belong to the current term and are in the said categories.
Album reviews (x)
EP reviews (x)
Track reviews (x)
Interviews (x)
Where
x
is a number from0
.Here’s my code and what I aim to accomplish:
<div?id="track-and-album-rev"?class="track-and-album-revs">
<?php?if(has_term($term,?'artists'))?{
echo?'<h1?style="display:table">Album?reviews';
echo?'<span?style="display:table-cell;?font-size:20px;?vertical-align:middle"> (';
I need to output the post count of the category "album-reviews" here;
echo?')</span></h1>';
echo?do_shortcode('[display xxx]');
}
xxx and so on...Any advice is highly appreciated!
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.