<?php  
   global $post ;
   $count = 0;
   $query_args = array('post_type' => 'post' , 'showposts' => $num , 'order_by' => $sort , 'order' => $order);
   if( $cat ) $query_args['category_name'] = $cat;
   $query = new WP_Query($query_args) ; 
   
   ob_start() ;?>
   
<?php if($query->have_posts()):  ?>  

<!--Blog Section-->
<section class="blog-news-section">
    <div class="auto-container">
    
        <!--Section Title-->
        <div class="sec-title text-center">
            <div class="subtitle-text"><?php echo balanceTags($upper_title);?></div>
            <h2><strong><?php echo balanceTags($title1);?></strong> <?php echo balanceTags($title2);?></h2>
        </div>
        
        <div class="row clearfix">
            <?php while($query->have_posts()): $query->the_post();
				global $post ; 
				$post_meta = _WSH()->get_meta();
			?>
            <!--BLog News COlumn-->
            <div class="blog-news-column col-md-4 col-sm-6 col-xs-12 wow fadeInLeft" data-wow-duration="1500ms" data-wow-delay="0ms">
                <div class="inner-box hvr-float-shadow">
                    <figure class="image-box"><a href="<?php echo esc_url(get_permalink(get_the_id()));?>"><?php the_post_thumbnail('tycheproperty_370x278');?></a></figure>
                    <div class="post-content">
                        <div class="post-tags">
							<?php $term_list = wp_get_post_terms(get_the_id(), 'category', array("fields" => "names")); ?>
                     		<?php echo implode( ', ', (array)$term_list );?>
                        </div>
                        <h3><a href="<?php echo esc_url(get_permalink(get_the_id()));?>"><?php the_title();?> </a></h3>
                        <div class="text"><?php echo balanceTags(tycheproperty_trim(get_the_content(), $text_limit));?></div>
                        <div class="more-link"><a href="<?php echo esc_url(get_permalink(get_the_id()));?>" class="read-more"><?php esc_html_e('Read More', 'tycheproperty');?></a></div>
                    </div>
                </div>
            </div>
            <?php endwhile;?>
            
        </div>
    </div>
</section>
                
<?php endif; ?>
<?php 
	wp_reset_query();
   $output = ob_get_contents(); 
   ob_end_clean(); 
   return $output ; ?>