<?php
wp_reset_postdata(); 
//wp_reset_query();
$post_selector_pseudo_query = $instance['some_posts'];
// Process the post selector pseudo query.
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
$html='';
// Use the processed post selector query to find posts.
$query_result = new WP_Query( $processed_query );
//print_r($query_result);
	$html.='<div class="layout_template_widget '.@$instance['cusom_class'].'">';
// Loop through the posts and do something with them.

//print_r($query_result);

if($query_result->have_posts()) : 
		//print_r($query_result);
	while($query_result->have_posts()) : $query_result->the_post(); 
		
		//$html.= get_the_content();  
		$page_id = get_the_ID();
		$include = get_page($page_id);
		$html.= apply_filters('the_content', $include->post_content);	   
	endwhile; 
	
endif; 

	$html.='</div>'; // end layout_template_widget
//wp_reset_query();
wp_reset_postdata(); 
echo $html;

?>