I'm using get_categories to list all the terms of my taxonomy "genre", but I have other taxonomy called "brands".
In Brands page (taxonomy-brands.php) I need to return all the posts from the brand and the genre they're related.
For example, I have a taxonomy page for Ferrari:
. Brand name: Ferrari
.. Genres: Red, Yellow
But I also have a taxonomy page for Wolkswagen:
. Brand name: Wolkswagen
.. Genre: Blue, Green
The problem is that Ferrari page, is also listing "Blue" and "Green", even if Ferrari doesn't have any posts related to Blue and Green.
Finally, is there any way to hide "Blue" and "Green" when they're not used?
Here is what I got so far: http://codepad.org/rWaVmuUT
If you need a visual example: http://i.imgur.com/PKGpi2o.png - "Sucos" and "CD" should not appear, since this brand only has posts with "Macarrão Instantaneo".