Orderby meta_value only returns posts that have existing meta_key
I have the following wp_query: $args = array( ‘post_type’ => ‘news’, ‘orderby’ => ‘meta_key’, ‘order’ => ‘ASC’, ‘meta_key’=>’custom_author_name’, ‘post_per_page’=>-1 ); $query = new WP_Query($args); echo $query->found_posts; echo = 10 results because there are only 10 news posts with a meta_key = custom_author_name. But there are hundreds of news posts that don’t have a post_meta row … Read more