I want to display the top 10 child taxonomies, no parent.

This code gets 1 top parent taxonomy, then only displays it's 10 children. I would like to grab top 10 child taxonomies of all parents of taxonomy.

By top, I mean most populated of course.


1 Answer 1


maybe you have to use this

    array( 'parent' => $cat->cat_ID )

Then, in a loop, display this array because you can't do it with an echo

foreach ($categories as $c) {
    // what you really want instead of var_dump is something to
    // to create markup-- list items maybe, For example...
    echo '<li>'.$c->cat_name.'</li>';
  • I am a bit confused, as to what loop to place the second part in. I am just wanting to display the top 10 child taxonomy links.
    – Joe Landry
    Commented May 17, 2019 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.