Using WP_Comment_Query to get comments

Ok so I’m trying to sort all comments associated with a post by the meta_key.

It currently displays all the comments with likes, but doesn’t show the comments without any likes now.

Here is the query:

$args = array(
           'post_id' => intval($_SESSION['thePostId']),
           'meta_key' => 'cld_like_count',
            'orderby' => 'meta_value',
            'order' => 'DESC',
            'parent' => '0',
        );

        // The Query
        $comments_query = new WP_Comment_Query;
        $comments = $comments_query->query( $args );

I would like it to display all comments, not just the ones with likes.
Not sure how to go about this.
Cheers

Read more here: Using WP_Comment_Query to get comments

Leave a Reply

Your email address will not be published. Required fields are marked *