Full code for Loop issue
HTML
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'post-single-no-sidebar' ); ?>>
<!-- Post Header -->
<header class="post-header">
<!-- Post Meta -->
<div class="post-cats">
<p class="categories center"><span>Posted In:</span><br><?php the_category(' | ') ?></p>
</div>
<!-- / Post Meta -->
<div class="post-title">
<?php if ( is_single() ) { ?>
<h3 class="pre-title">Blog Post<br></h3>
<?php
the_title( '<h1 class="entry-title">', '</h1>' );
} else {
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
}
?>
<div class="entry-meta">
By <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>"><?php the_author(); ?></a> on <?php the_time('F jS, Y') ?>. <?php get_author_posts_url( $author_id, $author_nicename ); ?>
</div>
<div class="top-social">
<div class="inner-social">
<!-- social placeholder -->
</div>
</div>
</div>
</header>
<!-- / Post Header -->
<!-- post content -->
<div class="code-block-content">
<div class="news-featured-image">
<a href="<?php esc_url( get_permalink() ) ;?>">
<?php the_post_thumbnail(featuredImageCropped); ?>
</a>
</div>
</div>
<div class="entry-content code-block-content post-contents">
<?php
the_excerpt();
wp_link_pages();
?>
</div>
<!-- / Post Content -->
<!-- Post Meta Bottom -->
<div class="entry-sub-meta code-block-content tags post-titles">
<p class="categories center"><?php if(has_tag()) { ?>
Tags: <?php the_tags('', ', ');
} else { ?>
<?php
}
?></p>
</div>
<!-- / Post Meta -->
</article>
<?php
endwhile;
endif;
?>