zZzzZ.
home2
/
zrzvbdry
/
airuzu.com
/
wp-content
/
themes
/
savings-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"> <?php $coupon_cat_header_breadcrumb = wpcoupon_get_option('coupon_cat_header_breadcrumb', false, ''); if( $coupon_cat_header_breadcrumb == true){ /** * Hooked * * @see wpcoupon_breadcrumb() - 15 * * @since 1.0.0 */ do_action( 'wpcoupon_before_container' ); } ?> <div class="inner shadow-box"> <div class="inner-content clearfix"> <?php $image_id = get_term_meta( $cate_id, '_wpc_cat_banner_image_id', true ); $thumb = false; if ( $image_id > 0 ) { $image = wp_get_attachment_image_src( $image_id, 'full' ); if ( $image ) { $thumb = '<img src="' . esc_attr( $image[0] ) . '" alt=" ">'; $thumb = 'background:url(' . esc_attr( $image[0] ) . ')'; } } ?> <div class="header-content single-cat-banner"> <?php $heading = wpcoupon_get_option( 'coupon_cate_heading', esc_html__( 'Newest %coupon_cate% Coupons', 'savings-pro' ) ); $heading = str_replace( '%coupon_cate%', $cate_title, $heading ); ?> <?php if ( ! $thumb ) { ?> <h1><?php echo wp_kses_post( $heading ); ?></h1> <?php } else {?> <h1><?php echo wp_kses_post( $heading ); ?></h1> <?php } ?> <?php //$description = get_the_archive_description(); //if ( $description ) { // echo '<div class="tax-desc">' . wpcoupon_toggle_content_more( $description ) . '</div>'; //} if ( wpcoupon_get_option( 'coupon_cate_socialshare' ) ) { /** * Hooked * * @see wpcoupon_store_share() - 15 * * @since 1.0.0 */ do_action( 'wpcoupon_cat_content' ); } ?> </div> </div> </div> </div> </section> <div id="content-wrap" class="container <?php echo esc_attr( $layout ); ?> single-cat-body"> <div id="primary" class="content-area"> <?php $is_coupon_feature_store_btn = wpcoupon_get_option( 'coupon_feature_store', true ); if($is_coupon_feature_store_btn) { ?> <div class="custom-feature-store"> <div class="feature-store-row"> <div class="feature-store-col"> <?php // get featured stores $featured_stores = wpcoupon_get_featured_stores( ); if ( count( $featured_stores ) ) { ?> <h2 class="section-heading"> <?php $feature_store_text = wpcoupon_get_option('feature_store_text', false, ''); echo esc_attr($feature_store_text, 'savings-pro' ); ?> </h2> <ul> <?php foreach ( $featured_stores as $store ) { wpcoupon_setup_store( $store ); ?> <li> <?php //$background_colors = array('#fff'); $background_colors = array('#b1ebc6', '#b1bbeb', '#ebd9b1', '#ebb1df', '#ffffff'); $count = count($background_colors) - 1; $i = rand(0, $count); $rand_background = $background_colors[$i]; ?> <a href="<?php echo get_term_link( $store, 'coupon_store' ) ?>" style="background-color: <?php echo $rand_background; ?>;"> <?php echo wpcoupon_store()->get_thumbnail(); ?> </a> <?php $count = wpcoupon_store()->count_coupon(); $total = array_sum( $count ); ?> <span> <?php esc_html_e($total>0?$total.'+':'0', 'savings-pro' ) ;?> <?php esc_html_e ('Coupons', 'savings-pro' );?> </span> </li> <?php } ?> </ul> <?php } ?> </div> </div> </div> <?php } ?> <div class="custom-newest-coupon"> <main id="main" class="site-main ajax-coupons" role="main"> <?php $sub_heading = wpcoupon_get_option( 'coupon_cate_subheading' ); $sub_heading = str_replace( '%coupon_cate%', $cate_title, $sub_heading ); ?> <div id="store-listings-wrapper" class="st-list-coupons wpb_content_element"> <?php if ( $sub_heading ) { ?> <h2 class="section-heading"><?php echo wp_kses_post( $sub_heading ); ?></h2> <?php } ?> <?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/loop-coupon-cat', $tpl ); } } else { ?> <div class="ui warning message"> <i class="close icon"></i> <div class="header"> <?php esc_html_e( 'Oops! No coupons found', 'savings-pro' ); ?> </div> <p><?php esc_html_e( 'There are no coupons for this store, please come back later.', 'savings-pro' ); ?></p> </div> <?php } ?> </div> </div> <?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" 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...', 'savings-pro' ); ?>"><?php esc_html_e( 'Load More Coupons', 'savings-pro' ); ?> <i class="arrow alternate circle down outline icon"></i></a> </div> </div> <?php } } else { ?> <div class="couponcat-pagination-wrap"> <?php get_template_part( 'content', 'paging' ); ?> </div> <?php } ?> </main><!-- #main --> <?php $ads = wpcoupon_get_option( 'coupon_cate_ads', '' ); if ( $ads ) { echo '<div class="clear"></div>'; echo balanceTags( $ads ); } ?> </div> </div><!-- #primary --> <div id="secondary" class="widget-area sidebar single-store-sidebar" role="complementary"> <?php dynamic_sidebar( 'sidebar-category' ); ?> </div> </div> <?php get_footer(); ?>