<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}
?>
<h2 id="category-title" class="archive-title">
    <?php printf(__('%s', 'pmthemes'), '<span>' . single_cat_title( '', false ) . '</span>'); ?>
</h2>
<?php
$categories = get_the_category();
$category_id = $categories[0]->cat_ID;
$my_query = new WP_Query( array( 'cat' => $category_id, 'showposts' => 1, 'ignore_sticky_posts' => 1 ) );
while ( $my_query->have_posts() ) : $my_query->the_post();
    $do_not_duplicate = $post->ID; ?>
    <h3 class="vid-title"><?php the_title(); ?></h3>
    <div class="entry clearfix">
        <?php the_content(); ?>
    </div>
<?php endwhile; ?>
<div class="clearfix"></div>
<div class="related-posts-grid">
    <div class="related-posts-columns related-posts-three-columns clearfix">
        <?php if ( have_posts() ) : while ( have_posts() ) : the_post();
            if ( $post->ID == $do_not_duplicate ) continue; ?>
            <div class="related-post-column clearfix">
                <a href="<?php the_permalink() ?>" title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?>">
                    <?php the_post_thumbnail('featured_image'); ?>
                    <p class="play"></p></a>
                <header class="entry-header">
                    <?php the_title( sprintf( '<h4 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h4>' ); ?>
                </header>
            </div>
        <?php endwhile; endif; ?>
    </div>
</div>