<?php
/**
 * Template part for displaying posts
 *
 * @link https://developer.WordPress.org/themes/basics/template-hierarchy/
 *
 * @package business_office
 */

?>

<article id="post-<?php the_ID(); ?>" <?php post_class( 'post-card c-card' ); ?>>
	<div class="blog-post-item post-card__inner c-card__body">
		<?php if ( has_post_thumbnail() ) : ?>
			<div class="featured-image">
				<?php business_office_post_thumbnail(); ?>
			</div>
		<?php endif; ?>
    
        <div class="entry-container post-card__content">
	        <div class="entry-meta post-card__meta">
        		<?php business_office_entry_footer(); ?>
				<?php business_office_posted_on(); ?>
        	</div>
	
			<header class="entry-header">
				<?php
				if ( is_singular() ) :
					the_title( '<h1 class="entry-title post-card__title">', '</h1>' );
				else :
					the_title( '<h2 class="entry-title post-card__title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
				endif; ?>
			</header>

			<?php $business_office_excerpt = get_the_excerpt();
			if ( !empty($business_office_excerpt) ) { ?>
				<div class="entry-content post-card__excerpt">
					<?php the_excerpt(); ?>
				</div>
			<?php } ?>

			<?php $business_office_read_more_label = get_theme_mod( 'read_more_label' , 'Read More' );
			if ( !empty($business_office_read_more_label) ) { ?>
				<div class="read-more post-card__footer">
					<a class="c-btn c-btn--outline" href="<?php the_permalink(); ?>"><?php echo esc_html($business_office_read_more_label);?></a>
				</div>
			<?php } ?>
		</div>
	</div>
</article><!-- #post-<?php the_ID(); ?> -->