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’.
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.
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.
My initial thoughts are to use get_categories but theres now way to define a specific taxonomy or ‘brand’?
$categories = get_categories('orderby=name&depth=1&hide_empty=0&child_of='.$cat);
Anyone done this before or knows a way to query the database directly to get the required results?
Any help is much appreicated, Thanks
sorry about the delay. managed to sort it on the WordPress stack exchange at the following link (for anyone who has the same issue): https://wordpress.stackexchange.com/questions/10998/get-categories-for-custom-post-type-with-a-specific-custom-taxonomy-attached