<?php ob_start(); 

$limit = ( $excerpt ) ? $excerpt : 20;
$query_args = array('post_type' => 'post' , 'showposts' => $num , 'order_by' => $sort , 'order' => $order);

if( $exclude) $query_args['post__not_in'] = explode(',', $exclude);

if( $cat ) $query_args['category'] = $cat;

$query = new WP_Query($query_args) ;?>

			<div class="padding bg-secondary">

				<div class="container">	

					<header class="header-section wow fadeInDown" data-wow-duration="1.5s">
						<h2><?php echo balanceTags($title); ?> </h2>
						<p><?php echo balanceTags($text); ?> </p>
					</header> <!-- / .header-section -->
					
					<div class="row blog-masonry">

						<?php while( $query->have_posts()): $query->the_post(); ?>

							<div class="col-md-4 blog-post-masonry wow fadeInUp" data-wow-delay="0s">
								<article class="blog-post">

									<div class="blog-post-media">
										<a href="<?php echo wp_get_attachment_url(get_post_thumbnail_id()); ?>" class="lightbox">
											<?php the_post_thumbnail('800x450'); ?>
										</a>
									</div> <!-- / .blog-post-media -->
									
									<div class="blog-post-info">
										<small><?php echo get_the_date(); ?> / <a href="#"><?php the_author(); ?></a></small>
										<h3 class="uppercase title">
											<a data-popup="#_sh_ajax_callback" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
										</h3>
									</div> <!-- / .blog-post-info -->

									<div class="blog-post-content">
										<p><?php echo _sh_trim(get_the_content(), $limit); ?></p>
										<a href="<?php the_permalink(); ?>" class="btn btn-primary read-more" title="<?php the_title_attribute() ?>"><?php esc_html_e('Read More', SH_NAME); ?></a>
									</div> <!-- / .blog-post-content -->

								</article> <!-- / .blog-post -->
							</div> <!-- / .blog-post-masonry -->
							
						<?php endwhile; ?>
						
					</div> <!-- / .row .blog-masonry -->
				</div>
			
			</div>

<?php wp_reset_postdata();
return ob_get_clean();