title: Wordpress: get_categories for custom post type with a specific custom taxonomy attached
body: <p>Basically I have a custom post type of 'products' which has two taxonomies attached to it...the normal 'category' and a custom taxonomy called 'brands'.</p>
  
  <p>I have a page which is 'brand' specific. On this page I'd like to list all the 'categories' that have a 'product' in them with a term of the 'brand' whos page I'm on attached.</p>
  
  <p>Eg. say I'm on the "Nike" page. I want it to list all categories that have a 'product' in them with the 'brand' of "Nike" attached to them.</p>
  
  <p>My initial thoughts are to use get_categories but theres now way to define a specific taxonomy or 'brand'?</p>
  
  <pre><code>$categories = get_categories('orderby=name&amp;depth=1&amp;hide_empty=0&amp;child_of='.$cat);
  </code></pre>
  
  <p>Anyone done this before or knows a way to query the database directly to get the required results? </p>
  
  <p>Any help is much appreicated, Thanks</p>