Skip to content

Instantly share code, notes, and snippets.

@mjangda
Created October 15, 2012 14:08
Show Gist options
  • Select an option

  • Save mjangda/3892642 to your computer and use it in GitHub Desktop.

Select an option

Save mjangda/3892642 to your computer and use it in GitHub Desktop.
Meta + category__in query
$args = array(
'category__in' => $cat_id_for_posts,
'meta_query' => array(
array(
'key' => $custom_field_key_show_in_sidebar,
'value' => $custom_field_value_show_in_sidebar,
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment