featured query
// WP_Query arguments
$args = array(
'post_type' => array( 'property' ),
'post_status' => array( 'publish' ),
'author' => '$user_id',
'posts_per_page' => '$per_page',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'fave_featured',
'value' => '1',
),
array(
'key' => 'sr_featured_was',
'value' => '1',
),
),
);
// The Query
$featured_query = new WP_Query( $args );
// The Loop
if ( $featured_query->have_posts() ) {
while ( $featured_query->have_posts() ) {
$featured_query->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();