How to show category list in WordPress
To limit the results to the children of the current product category, you can use parent parameter in get_terms(). The id of the current category, to be set as the parent value, will be get using get_queried_object(). $term_id = 0; $queried_object = get_queried_object(); // // check if it’s a custom category if ( $queried_object instanceof … Read more