I have this weird thing to do and I have no idea how to do it. Ok, so:
I have two custom taxonomies: collections and categories (both are prefixed, but for the sake of simplicity, I'll use these short names). A post will have a category and will be added into a collection.
What I have to do is to display all posts from a specific taxonomy - categories (already did this) and only show collections terms that have posts in the selected category. Some kind of hide_empty but based on another taxonomy. Make sense?
Since I use WPML plugin (that is known for adding stuff into sql query), I would like a solution that not involve the rewrite of the whole query.
So, any idea would be welcomed. Thanks!