'wpaf_coupons', 'posts_per_page' => '-1', 'post_status' => 'publish' ); /** * Coupon loop. * * @since 1.0 */ $wpaf_coupon_query = new WP_Query( $coupon_args ); if ( $wpaf_coupon_query->have_posts() ) { ?>
'wpaf_coupon_category' ) ); foreach ( $terms as $term ) { $term = (array) $term; echo ''; } ?>
'wpaf_coupon_vendor' ) ); foreach ( $terms as $term ) { $term = (array) $term; echo ''; } ?>
'wpaf_coupon_category' ) ); foreach ( $terms as $term ) { $term = (array) $term; echo ''; } ?>
name ); $args = array( 'post_type' => 'wpaf_coupons', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query -- Required to filter coupons by taxonomy in admin shortcode picker. 'tax_query' => array( array( 'taxonomy' => 'wpaf_coupon_category', 'field' => 'slug', 'terms' => $term->slug, ), ), ); $loop = new WP_Query( $args ); if ( $loop->have_posts() ) { while ( $loop->have_posts() ) : $loop->the_post(); ?> 'wpaf_coupons', 'post_status' => 'publish' ); $loop = new WP_Query( $args ); if ( $loop->have_posts() ) { while ( $loop->have_posts() ) : $loop->the_post(); ?>