• I am able to display categories with wp_list_categories and it’s great but I cant seem to ONLY display the child categories with no parents.

    Ok so I have categories and sub categories to them.

    Categories:

    Honda

    -Civic

    -Accord

    Toyota

    -Camery

    -Corrola

    Nissan

    -Maxima

    -Versa

    Now I want to display only 5 of those Sub_Categories randomly using wp-list-categories. I went through all of the args but still cant figure this out.

    So I would want to see randomly:

      Versa (22)
      Civic (5)
      Camery (44)
      Maxima (9)
      Corrola (4)

    (with out showing the parent of Honda, Nissan and so forth)

    How can this be done? or if it cannot with wp_list_categories then is there a better alternative? maybe with get_terms

  • The topic ‘How can I display only the child-categories and not the parents’ is closed to new replies.