The soju post is very useful because to get a subcategory of only category 1 category you just need to pass the category identifier with subcategories. But if the subcategory has no record, then it does not show, but the subcategory of the subcategory consists of a message, so add "hide_empty" => 0, in the above state it will look like
$args = array( 'taxonomy' => 'categories', 'parent' => 7, 'hide_empty' => 0, );
Bikram shrestha
source share