I am running an artist feature blog where I do interview artists from different countries and post some travel stuff from different countries.
I've set up a Custom Taxonomy called "Artist Name". This is only used on Interviews. The parent categories are different countries (Germany, US, France, China, etc.), the child categories are cities. I use categories on all posts (interviews and travel stuff).
I made a statistics page template where I want to show the total number of countries where my interviewees are from. In addition, I want to show the total number of countries where I've traveled to.
- Is it possible to get the total number of all PARENT categories of posts that use that custom taxonomy?
- Is it possible to get the total number of all PARENT categories of posts that do NOT use that custom taxonomy (e.g. when Artist Name is blank)?
I already tried to use some code snippets I found including: