<?php
/**
 * The front page template file
 *
 * If the user has selected a static page for their homepage, this is what will
 * appear.
 * Learn more: https://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 * @version 1.0
 */

get_header(); ?>


<!-- Slider Image -->
<div class="full slider-image-main">
	<!--<img src="<?php echo get_template_directory_uri(); ?>/images/slider-image.jpg" alt="" width="100%" style="display: block;" />-->
	<?php echo do_shortcode('[rev_slider home-page-slider]'); ?>
</div>
<!-- Welcome Section main -->
<div class="container welcome-section-main-container">
	<div class="two-third-section-main left welcome-left-section-main">
		<!-- Chrismist Sales done -->
		<div class="christmas-sales-main-section full">
			<?php 
			$ChristmasSalePage = get_post(29);
			$ChristmasSalePageImage = get_the_post_thumbnail_url($ChristmasSalePage->ID, 'full');
			?>
			<div class="christmas-sales-content-section left">
				<h1><?php echo $ChristmasSalePage->post_title; ?></h1>
				<p>
					<?php
						$ReadmoreText29 = '   <a href="'.get_permalink($ChristmasSalePage->ID).'">Read More</a>';
						echo $ChristmasSalePage->post_content; 
					?>
				</p>
				<!--<p class="call-btn-christmas-sales"><a href="tel:8888510765">888-851-0765</a></p>-->
				<p class="call-btn-christmas-sales"><a href="<?php echo get_permalink(46); ?>">get a Quote</a></p>
			</div>
			<div class="christmas-sales-image-section right">
				<img src="<?php echo $ChristmasSalePageImage; ?>" alt="" />
			</div>
			<div class="clear"></div>
		</div>
		<!-- Percentage Discount -->
		<div class="percentage-welcome-secton-main full">
			<?php 
			$DiscountCustomPostDetails = get_post(67);
			?>
		
			<div class="percentage-welcome-image-section left">
				<?php echo get_the_post_thumbnail($DiscountCustomPostDetails->ID, array(390,270) );?>
			</div>
			<div class="percentage-welcome-content-section left">
				<?php echo $DiscountCustomPostDetails->post_title; ?>
				<!--<h3>On All Christmas Boxes</h3>
				<h1>UPTO 15%<span> ff</span></h1>-->
				<p>
					<?php
						$ReadmoreText67 = '   <a href="'.get_permalink($DiscountCustomPostDetails->ID).'">Read More</a>';
						echo $DiscountCustomPostDetails->post_content; 
					?>
				</p>
				<!--<p class="call-btn-christmas-sales"><a href="<?php echo get_permalink(46); ?>">get a Quote</a></p>-->
			</div>
			<div class="clear"></div>
		</div>
		
	</div>
	<div class="one-third-section-main right welcome-right-image">
		<img src="<?php echo get_template_directory_uri(); ?>/images/welcome-image.png" alt="" />
	</div>
	<div class="clear"></div>
</div>
<!-- Boxes By Style Done -->
<?php 
/*
?>
<div class="boxes-by-style-main-outer-section container">
	<h1>BOXES BY STYLE</h1>
	<div class="full boxes-by-style-products-main">
		<!-- Product Single -->
		<?php 

		global $post;
		$arrgs = array(
						'post_per_page' => 4,
						'post_type' => 'products',
						'tax_query' => array(
							array(
								'taxonomy' => 'product_category',
								'field' => 'id',
								'terms' => 4,
								'include_children' => false
							)
						 )
					  );
		$myposts = get_posts($arrgs);
		
		foreach ($myposts as $post):setup_postdata($post);
			$FeatureThumbURL = get_the_post_thumbnail_url($post->ID, 'product-image-thumb');
		?>
			<div class="product-single-section left">
				<a href="<?php echo get_permalink($post->ID); ?>">
					<div class="single-product-image full">
						<img src="<?php echo $FeatureThumbURL; ?>" alt="" />
					</div>
					<h5><?php echo $post->post_title;?></h5>
				</a>
			</div>

		<?php
		endforeach;
		wp_reset_postdata();
		
		?>
		
		
		
		
		<div class="clear"></div>
	</div>
</div>
*/
?>

<!-- Three points with santa Section Done -->
<div class="three-points-santa-full-outer-section full">
	<div class="half-section three-santa-section-main left">
		<img src="<?php echo get_template_directory_uri(); ?>/images/big-santa-image.jpg" alt="" />			
	</div>
	<div class="half-section left">
		<div class="three-santa-content-section-main left">
			<?php 
			global $post;
			$arrgs = array('post_per_page' => 3, 'post_type' => 'three_features', 'order' => 'ASC');
			$myposts = get_posts($arrgs);
			foreach ($myposts as $post) : setup_postdata($post);
				$FeatureMainIcon = get_the_post_thumbnail_url($post->ID, 'full');
				$FeatureHoveIcon = get_field('hove_icon', $post->ID);
			?>	
				<div class="single-three-content-section-main full getting-order-icon" style="background-image: url('<?php echo $FeatureMainIcon; ?>');">
					<h2><?php echo $post->post_title; ?></h2>
					<p><?php echo $post->post_content; ?></p>
				</div>
			
			<?php
			endforeach;
			wp_reset_postdata();
			?>
			
			
		</div>
	</div>
	<div class="clear"></div>
</div>

<!-- Boxes By Style Done -->
<div class="boxes-by-style-main-outer-section container">
	<h1>CUSTOM CHRISTMAS BOXES</h1>
	<div class="full boxes-by-style-products-main">
		<!-- Product Single -->
		<?php 
		global $post;
		$arrgs = array(
						'posts_per_page' => '8',
						'post_type' => 'products',
						'tax_query' => array(
							array(
								'taxonomy' => 'product_category',
								'field' => 'id',
								'terms' => 5,
								'include_children' => false
							)
						 )
					  );
		$HomeProducts = get_posts($arrgs);
		foreach($HomeProducts as $post) : setup_postdata($post);
			$ProductImageThumb = get_the_post_thumbnail_url($post->ID,'product-image-thumb');
		?>
			<div class="product-single-section left">
				<a href="<?php echo get_permalink($post->ID); ?>">
					<div class="single-product-image full">
						<img src="<?php echo $ProductImageThumb; ?>" alt="" />
					</div>
					<h5><?php echo $post->post_title; ?></h5>
				</a>
			</div>
		
		<?php
		endforeach;
		wp_reset_postdata();
		?>
		<div class="clear"></div>
	</div>
</div>




<?php get_footer();
