I have a custom taxonomy (tax_classes) that has been registered to two custom post types (cpt_events and cpt_galleries). On the 'index' page for each of the custom post types I want to get the terms from the tax_classes taxonomy for that specific CPT. For example on the events CPT I want to show the terms that have been used by its posts post only.
I have looked into get_terms('tax_classes'); but this gives me ALL the terms for the taxonomy. Unfortunately there isn't a 'post_type' argument for the get_terms WP function to help with the filtering.
Any help on this would be greatly appreciated
Thanks
J