How to show subcategories using loop?

i am using wp_list_categories('child_of=54&title_li=') method to display all the subcategories, but it is showing only one, how can i use it with loop to show all the subcategories properly.
what should be the changing in the above code.
guide me to the solution

Related posts

Leave a Reply

1 comment

  1. i am giving solution of my own problem

    <?php 
        $descendant=array('child_of'=>54);
        $categories = get_categories($descendant);
        foreach($categories as $category) :
            echo $category->name;
        endforeach; 
    ?>