Post_Type::POST_TYPE, 'posts_per_page' => 1, 'post_status' => 'publish', 'order' => 'ASC', 'orderby' => 'ID', 'no_found_rows' => true, 'update_post_term_cache' => false, 'meta_query' => [ [ 'key' => 'gb_public_key', 'value' => $public_key, 'compare' => '=', ], ], ] ); if ( ! isset( $posts[0] ) ) { return false; } return $posts[0]; } }