The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Back End › WordPress – Show total number of posts in category or tag on the category or tag page
Im trying to find a php code which can show all posts number on category or tag on the category or tag page.
Right now, I’m showing the total posts on left sidebar of my site http://www.deluxetemplates.net but i prefer to show and post numbers on each category and tag on on the category or tag page.
So, if someone is on http://www.deluxetemplates.net/tag/business-blogger-templates i would like to show on top left sidebar the number of posts under this tag, and to hide the number which show total posts.
if you use the ‘get_terms’ function you can extract the number of posts that belong to the taxonomy. use the ‘count’;
and here you got an example: