Exclude posts with empty post_content in wp_query

This isn’t possible with a standard WP query, and you’ll have to leverage the use of posts_where before the WP_Query is called.

function the_dramatist_filter_where($where=""){
    $where .= " AND trim(coalesce(post_content, '')) <>''";
    return $where;
}

In the above, we’re simply only selecting posts where the column post_content isn’t empty.

Then add the filter.

add_filter('posts_where', 'the_dramatist_filter_where');

Now perform the query.

$query = new WP_Query(array('post_type' => 'post', 'posts_per_page' => 8));

And then when you’re done, remove the filter from the query so it doesn’t interfere.

remove_filter('posts_where', 'the_dramatist_filter_where');