My website has a taxonomy artists
, under which artist 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 from 0
.
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]