Independent counters for different CPTs when shared Taxonomy is used

Hi,

I have a question about ({{dc:term:count}}).

If one set of taxonomies is shared by different Custom Post Types they are counted all together by default. Occasionally, I desire the ability to display counters for shared taxonomies separately on a particular CPT.

We have 5 coaches and 15 athletes, both categorized under the Triathlon taxonomy. No matter where ({{dc:term:count}}) is used, it will show 20 (5 + 15) records. Is there a way to customize it to count records for coaches and athletes separately?

Hello John,

Thanks for writing in! Regretfully, there is no way to customize the count records since both the custom post types share the same category. It is best that you create a separate category for each post type. You can use something like coach-cat and athlete-cat taxonomy with the same name as “Triathlon”.

Hope this helps.

1 Like

Thanks @ruenel.

You are most welcome, John.