<?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) ; 
   ?>
<?php if($query->have_posts()):  ?>   

<!--News Section-->
<section class="news-section">
    <div class="auto-container">
        <!--Sec Title-->
        <div class="sec-title">
            <h2><?php echo wp_kses_post($title); ?></h2>
        </div>
        <div class="row clearfix">
            <?php while($query->have_posts()): $query->the_post();
                global $post ; 
                $post_meta = _WSH()->get_meta();
            ?>
            <!--News Block-->
            <div class="news-block col-md-4 col-sm-6 col-xs-12">
                <div class="inner-box hvr-float">
                    <div class="image">
                        <?php the_post_thumbnail('manufacto_370x260'); ?>
                        <a class="overlay-box" href="<?php echo esc_url(get_permalink(get_the_id()));?>"><span class="fa fa-link"></span></a>
                    </div>
                    <div class="lower-box">
                        <ul class="post-meta">
                            <li><a href="<?php echo get_month_link(get_the_date('Y'), get_the_date('m')); ?>"><span class="icon fa fa-calendar-o"></span><?php echo get_the_date('d M, Y');?></a></li>
                            <li><span class="icon fa fa-tags"></span><?php the_category(', '); ?></li>
                            <li><a href="<?php echo esc_url(get_permalink(get_the_id()).'#comments');?>"><span class="icon fa fa-comment-o"></span><?php comments_number( wp_kses_post(__('0 Comments' , 'manufacto')), wp_kses_post(__('1 Comment' , 'manufacto')), wp_kses_post(__('% Comments' , 'manufacto'))); ?></a></li>
                        </ul>
                        <h3><a href="<?php echo esc_url(get_permalink(get_the_id()));?>"><?php the_title(); ?></a></h3>
                    </div>
                </div>
            </div>
            <?php endwhile;?>
        </div>
    </div>
</section>
<!--End News Section-->

<?php endif; wp_reset_postdata(); ?>