Get only selected custom taxonomy
Before your first foreach loop, at the top of the script, define an empty array to house what you’re after: $taxWith_product_cat = array(); Now since you’re looping through all taxonomies and all terms therein, in the terms loop foreach($terms as $term), check if the current term is product_cat. If it is, add the terms taxonomy … Read more