Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Querying content by a meta key
$args = array(
'meta_key' => '_affiliatedCompany',
'meta_value' => $companyID,
'post_type' => 'article',
'posts_per_page' => 20,
$r = new WP_Query( $args );
if( $r && $r->have_posts() ) :
// the loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.