zZzzZ.
home2
/
zrzvbdry
/
couponetive.com
/
wp-content
/
themes
/
retail-pro-main
New Folder
Editing: taxonomy-coupon_category.php
Save
Cancel
<?php get_header(); $cate_title = single_cat_title( '', false ); $cate_id = get_queried_object_id(); $layout = wpcoupon_get_option( 'coupon_cate_layout', 'right-sidebar' ); ?> <section class="custom-page-header"> <div class="container"> <div class="inner-content clearfix"> <div class="header-content"> <?php $heading = wpcoupon_get_option( 'coupon_cate_heading', esc_html__( 'Newest %coupon_cate% Coupons', 'retail-pro' ) ); $heading = str_replace( '%coupon_cate%', $cate_title, $heading ); ?> <h1><?php echo wp_kses_post( $heading ); ?></h1> </div> </div> </div> </section> <div id="content-wrap" class="coupon_cat_single container <?php echo esc_attr( $layout ); ?>"> <div id="primary" class="content-area"> <div class="sm-filter-area"> <?php $my_posts = get_posts(array( 'post_type' => 'coupon', //post type 'numberposts' => -1, 'tax_query' => array( array( 'taxonomy' => 'coupon_category', //taxonomy name 'field' => 'id', //field to get 'terms' => $cate_id, //term id ) ) )); ?> <a href="#" id="show" class="filter-open"><?php echo esc_html__( 'Filter', 'retail-pro' ); ?> <?php echo $count = count($my_posts); ?> <?php echo esc_html__( 'Offers Available', 'retail-pro' ); ?></a> <div class="sm-filter-content-area"> <a href="#" id="hide" class="filter-close"><?php echo esc_html__( 'Close', 'retail-pro' ); ?></a> <div class="sm-filter-checkbox"> <?php /** * Hook: wpcoupon_coupon_category_before_sidebar * Hooked: wpcoupon_coupon_cat_filter_box - 10 * * @since 1.2.6 */ do_action( 'wpcoupon_coupon_category_before_sidebar' ); ?> </div> </div> </div> <main id="main" class="site-main ajax-coupons" role="main"> <section id="store-listings-wrapper" class="st-list-coupons wpb_content_element grid_loop"> <?php global $wp_rewrite, $wp_query; $max_pages = $wp_query->max_num_pages; $paged = wpcoupon_get_paged(); $current_link = $_SERVER['REQUEST_URI']; $tpl = wpcoupon_get_option( 'coupon_cate_tpl', 'cat' ); ?> <div class="cat-coupon-lists" id="cat-coupon-lists"> <?php if ( have_posts() ) { while ( have_posts() ) { the_post(); wpcoupon_setup_coupon( get_the_ID(), $current_link ); get_template_part( 'loop/trending_coupon', $tpl ); } } else { ?> <div class="ui warning message"> <i class="close icon"></i> <div class="header"> <?php esc_html_e( 'Oops! No coupons found', 'retail-pro' ); ?> </div> <p><?php esc_html_e( 'There are no coupons for this store, please come back later.', 'retail-pro' ); ?></p> </div> <?php } ?> </div> </section> <?php if ( 'ajax_loadmore' == wpcoupon_get_option( 'coupon_cate_paging', 'ajax_loadmore' ) ) { if ( $max_pages > $paged ) { ?> <div class="couponcat-pagination-wrap"> <div class="couponcat-load-more wpb_content_element"> <a href="<?php next_posts( $max_pages ); ?>" class="ui button btn btn_primary btn_large load_more_btn" data-link="<?php echo esc_attr( $current_link ); ?>" data-cat-id="<?php echo esc_attr( $cate_id ); ?>" data-loading-text="<?php esc_attr_e( 'Loading...', 'retail-pro' ); ?>"><?php esc_html_e( 'Load More Coupons', 'retail-pro' ); ?> <i class="angle down icon"></i></a> </div> </div> <?php } } else { ?> <div class="couponcat-pagination-wrap"> <?php get_template_part( 'content', 'paging' ); ?> </div> <?php } ?> </main><!-- #main --> </div><!-- #primary --> <div id="secondary" class="widget-area sidebar" role="complementary"> <div class="retail_pro_breadcrumb sm-breadcrumb"> <?php /** * Hooked * * @see wpcoupon_breadcrumb() - 15 * * @since 1.0.0 */ do_action( 'wpcoupon_before_container' ); ?> </div> <!-- Available --> <?php $my_posts = get_posts(array( 'post_type' => 'coupon', //post type 'numberposts' => -1, 'tax_query' => array( array( 'taxonomy' => 'coupon_category', //taxonomy name 'field' => 'id', //field to get 'terms' => $cate_id, //term id ) ) )); ?> <div class="offer_available"> <h3 class="available-coupon"><?php echo $count = count($my_posts); ?> <?php esc_html_e( 'Offers Available', 'retail-pro' ); ?></h3> </div> <?php /** * Hook: wpcoupon_coupon_category_before_sidebar * Hooked: wpcoupon_coupon_cat_filter_box - 10 * * @since 1.2.6 */ do_action( 'wpcoupon_coupon_category_before_sidebar' ); do_action('show_p_cat'); ?> <div class="about-store sidebar-section"> <?php $description = get_the_archive_description(); if ( $description ) { echo '<div class="tax-desc">' . wpcoupon_toggle_content_more( $description ) . '</div>'; } ?> </div> </div> <?php $ads = wpcoupon_get_option( 'coupon_cate_ads', '' ); if ( $ads ) { echo '<div class="clear"></div>'; echo balanceTags( $ads ); } ?> </div> <!-- /#content-wrap --> <div class="container"> <div class="retail_pro_breadcrumb"> <?php /** * Hooked * * @see wpcoupon_breadcrumb() - 15 * * @since 1.0.0 */ do_action( 'wpcoupon_before_container' ); ?> </div> </div> <?php $popular_cat = wpcoupon_get_option( 'category_single_page_popular_coupon_categories' ); ?> <?php if ($popular_cat==true) {?> <div class="container"> <div class="popular-store-cat-area"> <div class="widget"> <div class="widget-title"><?php echo wpcoupon_get_option('category_single_page_popular_stores_lebel', false, ''); ?></div> <div class="widget-content"> <?php $tax_args = array( 'hide_empty' => false, 'exclude_tree' => array(), 'orderby' => 'rand', 'order' => 'ASC', 'number' => 25, 'hierarchical' => false, 'pad_counts' => false, 'child_of' => 0, 'childless' => false, 'cache_domain' => 'core', 'taxonomy' => 'coupon_category', 'update_term_meta_cache' => true, ); $stores = get_terms( $tax_args ); global $post; ?> <div class="link-wrap"> <?php foreach ( $stores as $store ) { wpcoupon_setup_store( $store ); ?> <div class="item-link"> <a href="<?php echo wpcoupon_store()->get_url(); ?>"> <?php echo $store->name; ?> </a> </div> <?php } ?> </div> </div> </div> </div> </div> <?php } ?> <div class="container"> <?php if ( is_active_sidebar( 'nl-widget' ) ){ ?> <div class="nl-widget"> <?php dynamic_sidebar( 'nl-widget' );?> </div> <?php } ?> </div> <?php get_footer(); ?>