Skip to content

Instantly share code, notes, and snippets.

@jaybill
Last active December 15, 2015 18:49
Show Gist options
  • Save jaybill/5306373 to your computer and use it in GitHub Desktop.
Save jaybill/5306373 to your computer and use it in GitHub Desktop.
$args = array(
...
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'publish_date', // name of your custom field
'value' => time(),
'compare' => '<',
),
array(
'key' => 'expire_date', // name of your custom field
'value' => time(),
'compare' => '>',
),
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment