Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $today = date( 'Y-m-d' );
- $term = $wp_query->query_vars['term'];
- $args = array(
- 'post_type' => 'bgmp',
- 'tax_query' => array(
- array(
- 'taxonomy' => 'coupon',
- 'field' => 'slug',
- 'terms' => $term
- )
- ),
- 'meta_query' => array(
- array(
- 'key' => 'coupon_end_date',
- 'value' => $today,
- 'compare' => '>=',
- 'type' => 'DATETIME'
- )
- )
- );
- $the_query = new WP_Query( $args );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement