Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Query Posts By a Meta Value
<?php
$meta_query_args = array(
'meta_query' => array(
array(
'key' => 'featured_post',
'value' => 'yes',
'compare' => '='
)
)
);
$meta_query = new WP_Query( $meta_query_args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment