<?php
/**
 * Template name: Homepage V1
 *
 * This is the most generic template file in a WordPress theme and one of the
 * two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * For example, it puts together the home page when no home.php file exists.
 *
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * @subpackage classiera
 * @since classiera 1.0
 */
get_header(); ?>

<?php 

	$page = get_page($post->ID);
	$current_page_id = $page->ID;
	$page_slider = get_post_meta($current_page_id, 'page_slider', true); 

	global $redux_demo, $maximRange; 
	$trnsViewAll = $redux_demo['trns-btn-viewall'];
	$allCatURL = $redux_demo['all-cat-page-link'];
	$trnsCatVAll = $redux_demo['trns-cat-viewall-btn'];
	$max_range = $redux_demo['max_range'];
	if(!empty($max_range)) {
		$maximRange = $max_range;
	} else {
		$maximRange = 1000;
	}
	$category_icon_code = "";
	$category_icon_color = "";
	$your_image_url = "";
	$caticoncolor ="";
	$category_icon ="";
	$homeLayout = $redux_demo['opt-homepage-layout']['enabled'];

?>
<?php
if ($homeLayout):
	foreach ($homeLayout as $key=>$value) {
 
			switch($key) {
		 
					case 'banner': get_template_part( 'templates/slider/slidermap' );
					break;
			 
					case 'premiumslider': get_template_part( 'templates/homev1/pslider' );
					break;	
			 
					case 'categories': get_template_part( 'templates/category/catstyle1' );    
					break;  
					
					case 'customads': get_template_part( 'templates/customads' );
					break;
					
					case 'callout': get_template_part( 'templates/callout/style1' );    
					break; 
					
					case 'location': get_template_part( 'templates/locations/locationstyle1' );    
					break; 
					
					case 'advertisement': get_template_part( 'templates/adv/advstyle1' );    
					break;
					
					case 'packages': get_template_part( 'templates/homev1/homeplan' );    
					break;
					
					case 'partners': get_template_part( 'templates/companyv1' );    
					break;			 
				}			 
			}		 
	endif;
get_footer(); ?>