File: /home/kashmira/public_html/razitahir.com/wp-content/themes/upress/template-parts/posts-related.php
<div class="related-posts-grid">
<?php
$args = array(
	'cat' => $block_cat,
	'posts_per_page' => intval(get_theme_mod('related_posts_limit', 3))
);
$posts_query = new WP_Query( $args );
// The Loop
if ( $posts_query->have_posts() ) {
	while ( $posts_query->have_posts() ) {
		$posts_query->the_post(); ?>
		<div class="related-post-block">
			<div class="post-thumbnail mb-10">
				<a href="<?php the_permalink() ?>" aria-label="<?php the_title() ?>">
				
					<?php
						if ( has_post_thumbnail() ) {
							the_post_thumbnail('postblock-grid');
						}
						else {
							echo '<img src="' . get_template_directory_uri() . '/images/nothumb-360.jpg" alt="'.get_the_title().'" />';
						}
					?>
				</a>
			</div>
			<div class="post-title mt-5 mb-10">
				<h5>
					<a href="<?php the_permalink() ?>">
						<?php 
							$trimtitle = get_the_title(); 
							$shorttitle = wp_trim_words( $trimtitle, $num_words = 14, $more = '… ' ); 
							echo $shorttitle; 
						?>
					</a>
				</h5>
			</div>
		</div>
	<?php }
} else {
	// no posts found
}
/* Restore original Post Data */
wp_reset_postdata();
?>
</div>