<?php
/**
 *
 * Template name: Homepage
 * The template for displaying homepage.
 *
 * @package Texas
 */

get_header();?>  

<?php
if(texas_check_kirki()){
	$section_default = array( 'slider',	'blog',	'tool',);
	  $sortable_value = maybe_unserialize( get_theme_mod( 'home_layout',$section_default ) );
	  
	  
	  if ( ! empty( $sortable_value ) ) : 
		foreach ( $sortable_value as $checked_value ) :
		  get_template_part( '/custom/section/homepage-'.esc_attr( $checked_value ), '' );
		endforeach;
	  endif;  
}else{
	
	 get_template_part( 'index' );
	
}
?>

<?php get_footer(); ?>