This is sample code for WordPress query by meta name and value
$args = array( 'post_type' => 'post', 'post_status' => 'publish', 'meta_query' => array(array( 'key' => 'Name', 'value' => 'John', ))); $Results = new WP_Query( $args );