zZzzZ.
home2
/
zrzvbdry
/
airuzu.com
/
wp-content
/
themes
/
savings-pro-main
/
templates
New Folder
Editing: frontpage.php
Save
Cancel
<?php /** * Template Name: Front Page * * @package Savings-Pro * @since 1.0. */ get_header(); /** * Hooks wpcoupon_after_header * * @see wpcoupon_page_header(); * */ //do_action( 'wpcoupon_after_header' ); $layout = wpcoupon_get_site_layout(); if ( ! is_active_sidebar( 'frontpage-sidebar' ) ) { $layout = 'no-sidebar'; } ?> <?php // check if Banner Section is Enable $is_enable_fontpage_banner_btn = wpcoupon_get_option( 'enable_fontpage_banner_button', true ); if ($is_enable_fontpage_banner_btn) { ?> <?php $banner_control = wpcoupon_get_option('banner_control', true); if($banner_control == 'banner') { ?> <section class="offer-banner"> <div class="container"> <a href="<?php echo wpcoupon_get_option('banner_url', false, ''); ?>"> <picture class="font-page-banner"> <source srcset="<?php echo wpcoupon_get_option('fontpage_banner', false, 'url'); ?>" media="(min-width: 1030px)"> <img src="<?php echo wpcoupon_get_option('fontpage_banner', false, 'url'); ?>" alt="<?php echo get_bloginfo( 'name' ) ?>" width="2728" height="232"> </picture> </a> </div> </section> <?php } elseif( $banner_control == 'code'){ ?> <?php $banner_code = wpcoupon_get_option('banner_code'); if($banner_code != null){ ?> <section class="offer-banner"> <div class="container"> <?php echo $banner_code; ?> </div> </section> <?php } else if( $banner_code == null) { ?> <?php esc_html__( 'There are no banner attached into this section. Insert the banner image or code in here.', 'savings-pro' );?> <?php } }else{ ?> <?php esc_html__( 'There are no banner attached into this section. Insert the banner image or code in here.', 'savings-pro' );?> <?php } } ?> <?php // check if header login btn is enable $is_enable_fontpage_search_btn = wpcoupon_get_option( 'enable_fontpage_search_banner', true ); if ($is_enable_fontpage_search_btn) { ?> <section class="hero-search-section search-banner-bg"> <div class="container"> <div class="hero-content"> <h1 class="main-search-title"><?php echo wpcoupon_get_option('banner_headline_one'); ?></h1> <h2 class="sub-search-title"><?php echo wpcoupon_get_option('banner_headline_two'); ?></h2> <div class="header_search" style="<?php echo $hs_width; ?>"> <form action="<?php echo home_url( '/' ); ?>" method="get" id="header-search"> <div class="header-search-input ui search large action left icon input"> <input autocomplete="off" class="prompt" name="s" placeholder="<?php echo wpcoupon_get_option('search_placeholder_content'); ?>" type="text"> <button class="header-search-submit ui button"><i class="search icon"></i></button> <div class="results"> <?php $store_ids = wpcoupon_get_option( 'top_search_stores' ); if ( ! empty( $store_ids ) ) { $stores = wpcoupon_get_stores( array( 'include'=> $store_ids ) ); if ( $stores ) { $links = array(); foreach ( $stores as $store ){ $links[] = '<div class="result"><a href="'.get_term_link( $store, 'coupon_store' ).'"></a><div class="image">'.wpcoupon_store()->get_thumbnail().'</div><div class="content"><div class="title">'.esc_html( $store->name ).'</div></div></div>'; } $links = join($links ); if ( $links ) { ?> <?php echo $links; ?> <?php } } } ?> </div> </div> <div class="clear"></div> </form> </div> </div> <?php $is_img_blank = wpcoupon_get_option('search_banner_img', false, 'url'); if ($is_img_blank != '') {?> <div class="hero-image"> <img src="<?php echo wpcoupon_get_option('search_banner_img', false, 'url'); ?>" alt="Search Banner"> </div> <?php } ?> </div> </section> <?php } ?> <?php if ( is_active_sidebar( 'frontpage-before-main' ) ){?> <section class="content-before-main-section favorite-deals-section"> <div class="container"> <?php dynamic_sidebar( 'frontpage-before-main' ); ?> </div> </section> <?php } ?> <?php if ( is_active_sidebar( 'frontpage-main' ) ) { ?> <section class="content-main-widget-section favorite-deals-section"> <div class="container"> <main id="main" class="site-main content-widgets" role="main"> <?php dynamic_sidebar('frontpage-main');?> </main> </div> </section> <?php } ?> <?php $is_enable_fontpage_blog_btn = wpcoupon_get_option( 'enable_fontpage_blog', true ); if ($is_enable_fontpage_blog_btn) { ?> <section class="blog-section"> <div id="content-wrap" class="frontpage-container container <?php echo esc_attr( $layout ); ?>"> <h3 class="blog-section-header"><?php echo wpcoupon_get_option('fontpage_blog_headline'); ?></h3> <div class="blog-body"> <div class="store-listing front-blog-listing"> <div class="store-listing-box store-popular-listing font-blog-content-list"> <div class="store-letter-content"> <div class="front-blog"> <?php global $post; query_posts(array('post_type' => 'post', //'offset' => 1, 'showposts' => 5, )); $post_nb = 1; while ( have_posts() ) : the_post(); if( $post_nb == 1){ ?> <div class="large-img-post"> <div class="store-thumb"> <?php if ( has_post_thumbnail() ) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="ui image middle aligned"> <?php the_post_thumbnail(); ?> </a> <?php endif; ?> </div> <div class="large-content"> <div class="tags-links"> <?php $counter=0; $posttags = get_the_category(); if ($posttags) { echo ' '; foreach($posttags as $tag) { if($counter!=0){ echo ' | '; } echo esc_attr($tag->name) . ''; $counter++; } } ?> </div> <h3 class="blog-title"><a href="<?php the_permalink();?>"><?php echo the_title();?></a></h3> <div class="post-date"><?php the_time('F jS, Y') ?></div> </div> </div> <?php }else{ ?> <div class="small-img-post"> <div class="store-thumb"> <?php if ( has_post_thumbnail() ) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" class="ui image middle aligned"> <?php the_post_thumbnail(); ?> </a> <?php endif; ?> </div> <div class="tags-links"> <?php $counter=0; $posttags = get_the_category(); if ($posttags) { echo ' '; foreach($posttags as $tag) { if($counter!=0){ echo ' | '; } echo esc_attr($tag->name) . ''; $counter++; } } ?> </div> <h3 class="blog-title"><a href="<?php the_permalink();?>"><?php echo the_title();?></a></h3> <div class="post-date"><?php the_time('F jS, Y') ?></div> </div> <?php } $post_nb++; endwhile; ?> </div> </div> </div> </div> </div> <?php $is_enable_fontpage_blog_goto_btn = wpcoupon_get_option( 'enable_fontpage_blog_goto_btn', true ); if ($is_enable_fontpage_blog_goto_btn) { ?> <a class="blog-page-btn" href="<?php echo esc_url( home_url( '/'.wpcoupon_get_option('fontpage_blog_goto_btn_page_slug') ) );?>"><?php echo esc_attr_e(wpcoupon_get_option('fontpage_blog_goto_btn_txt'))?></a> <?php }?> <div class="clear"></div> </div> <!-- /#content-wrap --> </section> <?php }?> <?php if ( is_active_sidebar( 'frontpage-2nd-main' ) ){ ?> <section class="frontpage-2nd-main frontpage-after-main"> <div class="container"> <?php echo '<div class="content-widgets">'; dynamic_sidebar( 'frontpage-2nd-main' ); echo '</div>'; ?> </div> </section> <?php } ?> <!-- Favorite Deals of the Season --> <?php if ( is_active_sidebar( 'frontpage-3rd-main' ) ){ ?> <section class="frontpage-widget-after-main"> <div class="container"> <?php echo '<div class="content-widgets frontpage-after-main">'; dynamic_sidebar( 'frontpage-3rd-main' ); echo '</div>'; ?> </div> </section> <?php } ?> <!-- Favorite Deals of the Season --> <?php if ( is_active_sidebar( 'frontpage-after-main' ) ){ ?> <?php echo '<div class="content-widgets frontpage-after-main">'; dynamic_sidebar( 'frontpage-after-main' ); echo '</div>'; ?> <?php } ?> <!-- About Section --> <?php $is_enable_fontpage_about = wpcoupon_get_option( 'enable_fontpage_about', true ); if ($is_enable_fontpage_about) { ?> <section class="about-page-section"> <div class="container"> <?php $is_about_img_blank = wpcoupon_get_option('fontpage_about_img', false, 'url'); if($is_about_img_blank != '') {?> <div class="about-left-image"> <img src="<?php echo wpcoupon_get_option('fontpage_about_img', false, 'url'); ?>" alt="about Page"> </div> <?php } ?> <div class="about-right-content"> <h3> <?php echo wpcoupon_get_option('fontpage_about_title'); ?></h3> <div class="about-content"> <?php echo wpcoupon_get_option('fontpage_about_content'); ?> </div> </div> </div> </section> <?php } ?> <?php get_footer(); ?>