Skip to content

Instantly share code, notes, and snippets.

@Ahrengot
Created January 31, 2012 11:17
Show Gist options
  • Save Ahrengot/1709968 to your computer and use it in GitHub Desktop.
Save Ahrengot/1709968 to your computer and use it in GitHub Desktop.
WordPress database query looking for specific keys and values
$default_query = array(
'posts_per_page' => -1,
'post_type' => 'kunstnere',
'order' => 'ASC',
'orderby' => 'meta_value',
'meta_key' => 'artist_meta_time_input',
'meta_query' => array(
array(
'key' => 'artist_meta_scene_select',
'value' => 'Scene 1',
'compare' => '='
),
array(
'key' => 'artist_meta_day_select',
'value' => $day,
'compare' => '='
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment