<?php
/**
 * Single post template (blog posts).
 */
get_header();
?>
<?php while ( have_posts() ) : the_post(); ?>
  <header class="mp-page-hero">
    <div class="mp-page-hero-inner">
      <div class="mp-page-eyebrow">
        <?php if ( has_category() ) the_category( ' · ' ); else esc_html_e( 'Article', 'merchantpro' ); ?>
      </div>
      <h1 class="page-title"><?php the_title(); ?></h1>
      <p class="page-sub">
        <?php echo esc_html( get_the_date() ); ?>
        <?php if ( get_the_author() ) : ?>
          · <?php echo esc_html( get_the_author() ); ?>
        <?php endif; ?>
      </p>
    </div>
  </header>

  <main class="mp-page-body">
    <div class="mp-page-body-inner">
      <?php if ( has_post_thumbnail() ) the_post_thumbnail( 'large' ); ?>
      <?php the_content(); ?>
    </div>
  </main>

  <?php if ( comments_open() || get_comments_number() ) : ?>
    <div class="mp-page-body" style="border-top:0;padding-top:0">
      <div class="mp-page-body-inner mp-comments">
        <?php comments_template(); ?>
      </div>
    </div>
  <?php endif; ?>
<?php endwhile; ?>

<?php get_footer(); ?>
