<!-- Main Ads section Start -->
<?php 
	global $wp_rewrite;
	global $redux_demo;
	if ($wp_rewrite->permalink_structure == ''){
		//we are using ?page_id
		$permalink_type = "&";
	}else{
		//we are using permalinks
		$permalink_type = "?";
	}
	if (is_page_template( 'template-homepage-v1.php' )){
		//we are using ?page_id
		$permalink_type = "?";
	}
	$cat_counter = $redux_demo['home-ads-view'];
	if(isset($_GET['view-type'])){
		$current_view_type = $_GET['view-type'];
	}else{
		$current_view_type = $cat_counter;
	}
	if($current_view_type == 'list'){
		get_template_part('templates/listing-ads-fullwidth');
	}
	if($current_view_type == 'grid'){
		get_template_part('templates/grid-ads-fullwidth');
	}
?>	
<!--End Main Ads section -->