I've got a custom taxonomy "sector" associated to posts; posts are assigned to the default categories as well. What I'd like to achieve is to show in a custom sidebar a list of "categories" link/name, the post of which are assigned to the selected "sector".
Eg.: say that my data are organized like this (hope this make sense), with three posts associated to a various categories AND to a particular sector:
Post 1
- category: category_1
- sector: sector_1
Post 2
- category: category_2
- sector: sector_1
Post 3
- category: category_3
- sector: sector_1
Now, when I'm in the "sector_1" archive page, in the sidebar I'd like to show the following list:
- category_1
- category_2
- category_3
Is this possible? Maybe using tax_query or other methods?