I made an output of subcategories, only the current category using:
foreach ($terms as $term) { if (($term->category_parent ?: $term->cat_ID) !== get_qu