Get a taxonomy of goods in the category

by EndyVelvet   Last Updated April 16, 2018 14:08 PM

I have a taxonomy of product Brands

That's how I get ALL brands of my products

$pwb_brands = get_terms(array(
    'taxonomy' => 'g-brand',
    'hide_empty' => false,
));

How do I get product brands in a certain category?

Product 1 - Brand A - Category 7
Product 2 - Brand B - Category 5
Product 3 - Brand C - Category 5
Product 4 - Brand D - Category 8
Product 5 - Brand E - Category 8

I need to get brands B and C if I'm in category 5



Related Questions



Why does wp_remove_object_terms not work?

Updated April 01, 2018 06:08 AM


Can't get products by parent id in WooCommerce archive

Updated January 23, 2018 19:08 PM

Get WooCommerce Terms Help

Updated January 11, 2018 22:08 PM