<?php
/**
 * Post rendering content according to caller of get_template_part.
 *
 * @package masterpiece
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}
$col_value = 12 / get_theme_mod('mp_post_columns', '1');
?>

<article <?php post_class("col-12 col-md-{$col_value} list-archive"); ?> id="post-<?php the_ID(); ?>">
	<div class="row">
		<div class="col-md-6">
			
			<div class="img-wrapper">
				<?php echo get_the_post_thumbnail( $post->ID, 'large' ); ?>
			</div>
			<footer class="entry-footer">

				<?php masterpiece_entry_footer(); ?>

			</footer><!-- .entry-footer -->
		</div>
		<div class="col-md-6">
			<header class="entry-header">
				<?php printf(	'<h2 class="entry-title"><a href="%s" rel="bookmark">%s</a></h2>', esc_url( get_permalink() ), the_title_attribute('echo=0') ); ?>
				<?php if ( 'post' == get_post_type() ) : ?>

					<div class="entry-meta">
						<?php masterpiece_posted_on(); ?>
					</div><!-- .entry-meta -->

				<?php endif; ?>

			</header><!-- .entry-header -->
			<div class="entry-content">

				<?php
				the_excerpt();
				?>

				<?php
				wp_link_pages( array(
					'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'masterpiece' ),
					'after'  => '</div>',
				) );
				?>

			</div><!-- .entry-content -->

		</div>
	</div>

</article><!-- #post-## -->
