Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $m_query = array(
- 'relation' => 'OR',
- 'mls_no_maine' => array(
- 'key' => $prefix . 'mls_no_maine',
- 'compare' => 'EXISTS',
- ),
- 'mls_no_maine' => array(
- 'key' => $prefix . 'mls_no_maine',
- 'compare' => 'NOT EXISTS',
- ),
- );
- $args = array(
- 'post_type' => array( 'ts-listings' ),
- 'post_status' => array( 'publish' ),
- 'posts_per_page' => '-1',
- 'meta_query' => $m_query,
- // 'meta_key' => $prefix . 'mls_no_maine',
- 'orderby' => 'meta_value',
- 'order' => 'ASC',
- );
- $q = new WP_Query($args);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement