get_comments() where parent is not 0

You cannot do that with a parameter for get_comments(), but filtering 'comments_clauses' should do it.

Sample code, not tested:

add_filter( 'comments_clauses', 'wpse_78490_child_comments_only' );

function wpse_78490_child_comments_only( $clauses )
{
    $clauses['where'] .= ' AND comment_parent != 0';
    return $clauses;
}

Leave a Comment