Skip to content

Instantly share code, notes, and snippets.

@ChrisBuchholz
Created November 12, 2013 20:12
Show Gist options
  • Save ChrisBuchholz/7437823 to your computer and use it in GitHub Desktop.
Save ChrisBuchholz/7437823 to your computer and use it in GitHub Desktop.
<?php
$query = new WP_Query([
'meta_query' => [
'relation' => 'AND',
[
'key' => 'locationlat',
'value' => [$sw[0], $ne[0]],
'type' => 'numeric',
'compare' => 'BETWEEN'
],
[
'key' => 'locationlng',
'value' => [$sw[1], $ne[1]],
'type' => 'numeric',
'compare' => 'BETWEEN'
]
]
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment