Quantcast
Channel: Question and Answer » meta-query
Viewing all articles
Browse latest Browse all 36

loop query exclude meta_key with meta_value

$
0
0

Hi I use a loop like this:

// show all active coupons for this store and setup pagination
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts( array(
    'post_type' => APP_POST_TYPE,
    'post_status' => 'publish',
    APP_TAX_STORE => $term->slug,
    'ignore_sticky_posts' => 1,
    'posts_per_page' => -1,
    'paged' => $paged
) );

Now I have a meta value meta_key' => 'clpr_excoupon' it is either 1 or 0.

I would like to exclude all meta_key' => 'clpr_excoupon' with 'meta_value'=> 0, and also ‘NOT EXISTS’ need help!!


Viewing all articles
Browse latest Browse all 36

Trending Articles