• what is the best way?

    do i have to do custom loop, or can achieve this by doing multiple loops around the object, but this gonna effect the performance.

    now i have this:

    $scats = get_categoires();
    foreach($scats as $scat) {
    	if (!$scat->category_parent) {
    		// do stuff
    	}
    }

    but i need to filter duplicates categories assigned to the same parent.

  • The topic ‘How to get all categories that have childrens?’ is closed to new replies.