zZzzZ.
home2
/
zrzvbdry
/
couponetive.com
/
wp-content
/
themes
/
retail-pro-main
/
templates
New Folder
Editing: store-az.php
Save
Cancel
<?php /** * Template Name: Store Listing by Alphabet * * Display Store by alphabet * * @package ST-Coupon * @since 1.0. */ get_header(); ?> <div class="all-store"> <section class="custom-page-header"> <div class="container"> <?php $show_page_header = get_post_meta( $post->ID, '_wpc_show_header' , true); $show_page_header; if($show_page_header=='on'){ ?> <div class="page-heading"> <?php the_title(); ?> </div> <?php } ?> </div> </section> <div id="content-wrap" class="container no-sidebar"> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php if ( taxonomy_exists( 'coupon_store' ) ) { $args = array( 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false, 'include' => array(), 'exclude' => array(), 'exclude_tree' => array(), 'number' => '', 'offset' => '', 'fields' => 'all', 'name' => '', 'slug' => '', 'hierarchical' => false, 'search' => '', 'name__like' => '', 'description__like' => '', 'pad_counts' => false, 'get' => '', 'child_of' => 0, 'parent' => wpcoupon_get_option( 'stores_listing_hide_child', 0 ) ? 0 : '', 'childless' => false, 'cache_domain' => 'core', 'update_term_meta_cache' => true, 'meta_query' => '' ); $stores = get_terms( 'coupon_store', $args ); $_stores = array(); $_stores_number = array(); // Group stores by alphabet foreach ( $stores as $k => $store ) { $first_char = mb_substr($store->name, 0, 1); $first_char = strtoupper( $first_char ); if( is_numeric( $first_char ) ) { $_stores_number[] = $store; } else { if ( ! isset( $_stores[ $first_char ] ) ) { $_stores[ $first_char ] = array(); } $_stores[ $first_char ][] = $store; } } ?> <div class=""> <section class="feature_image"> <?php $tax_args = array( 'hide_empty' => false, 'exclude_tree' => array(), 'number' => 12, 'hierarchical' => false, 'pad_counts' => false, 'child_of' => 0, 'childless' => false, 'cache_domain' => 'core', 'taxonomy' => 'coupon_store', 'update_term_meta_cache' => true, ); $stores = get_terms( $tax_args ); global $post; ?> <div class="store-listing-box store-popular-listing"> <div class="store-letter-heading"> <h2 class="section-heading"><?php esc_html_e( 'Popular Stores', 'retail-pro' ); ?></h2> </div> <div class="store-letter-content"> <div class="p_store_grid"> <?php foreach ( $stores as $store ) { wpcoupon_setup_store( $store ); ?> <div class="store-list"> <a href="<?php echo get_term_link( $store, 'coupon_store' ) ?>"> <div class="store_img"> <div class="store-thumb"> <div class="strore-thumb-border"> <?php echo wpcoupon_store()->get_thumbnail(); ?> </div> </div> </div> <div class="stor-cat-name"> <?php echo $store->name; ?> </div> </a> </div> <?php } ?> </div> </div> </div> </section> <section class="all-store-cat-tab-sec"> <div class="store-letter-heading"> <h2 class="section-heading"><?php esc_html_e( 'All Store', 'retail-pro' ); ?></h2> </div> <div class="tabset"> <!-- Tab 1 --> <?php foreach ($_stores as $k => $list_stores) { ?> <input type="radio" name="tabset" id="tab-<?php echo esc_attr( $k ); ?>" class="tab_r" aria-controls=tab-<?php echo esc_attr( $k ); ?>"> <label for="tab-<?php echo esc_attr( $k ); ?>"><?php echo esc_html( $k ); ?></label> <?php } if ( count( $_stores_number ) ) { ?> <!-- Tab 2 --> <input type="radio" name="tabset" id="tab-<?php echo esc_html('character-0-9', 'retail-pro'); ?>" class="tab_r" aria-controls="tab-<?php echo esc_html('character-0-9', 'retail-pro'); ?>"> <label for="tab-<?php echo esc_html('character-0-9', 'retail-pro'); ?>"><?php esc_html_e( '0 - 9', 'retail-pro' ); ?></label> <?php } ?> <div class="tab-panels"> <?php foreach ( $_stores as $k => $list_stores ) { ?> <section id="tab-<?php echo esc_attr( $k ); ?>" class="tab-panel"> <div class="store-letter-content"> <ul class="clearfix"> <?php foreach ( $list_stores as $store ) { ?> <li><a href="<?php echo get_term_link( $store, 'coupon_store' ); ?>"><?php echo esc_html( $store->name ); ?></a></li> <?php } ?> </ul> </div> </section> <?php } ?> <?php if ( count( $_stores_number ) ) { ?> <section id="tab-<?php echo esc_html('character-0-9', 'retail-pro'); ?>" class="tab-panel"> <div class="store-letter-content"> <ul class="clearfix"> <?php foreach ( $_stores_number as $store ) { ?> <li><a href="<?php echo get_term_link( $store, 'coupon_store' ); ?>"><?php echo esc_html( $store->name ); ?></a></li> <?php } ?> </ul> </div> </section> <?php } ?> </div> </div> </section> </div> <?php } else { ?> <div class="ui warning message"> <div class="header"> <?php esc_html_e( 'Oops! No stores found', 'retail-pro' ); ?> </div> <p><?php esc_html_e( 'You must activate wpcoupons plugin to use this template.', 'retail-pro' ); ?></p> </div> <?php } ?> </main><!-- #main --> </div><!-- #primary --> <?php wp_reset_postdata(); ?> </div> <!-- /#content-wrap -->` </div> </div> <div class="container"> <?php if ( is_active_sidebar( 'page-cus-menu-widget' ) ){ ?> <div class="cus-page-menu"> <?php dynamic_sidebar( 'page-cus-menu-widget' );?> </div> <?php } ?> </div> <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(); ?>