Creating a “walled garden” of comments
Some suggestions, added as comments: function filter_the_comments( $array ) { $comment_IDs = array(); foreach ( $array as $key => $val ) { //assuming the comments are sorted by date in ascending order, a parent has to come before the child comment, so there is no need to wait till all subsequent IDs have been added … Read more