<?php

$taxurl = mtm_acf_taxonomy_sub_property('home_topic', 'taxonomy');
$termurl = mtm_acf_taxonomy_sub_property('home_topic', 'slug');
$pathurl = $taxurl . '/' . $termurl;
?>

<h3 class="mtm-home-topic--label <?php 
echo esc_html($termurl);
?>
"><a href="<?php 
echo esc_url(home_url($pathurl));
?>
"><?php 
echo esc_html(mtm_acf_taxonomy_sub_property('home_topic', 'name'));
?>
</a></h3>

<?php 
the_mtm_post_thumbnail('medium_large', 'mtm-home-topic--image');
?>

<h4 class="mtm-home-topic--primary"><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h4>
<div class="mtm-home-featured--story">
		
	<div class="mtm-home-featured--story-image">	
		<?php 
the_mtm_post_thumbnail('medium_large');
?>
	</div>

	<div class="mtm-home-featured--story-text">
		<h2><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h2>
		
		<?php 
//if( _get_field( 'mtm_home_show_featured_excerpt' ) ) {
the_excerpt();
//}
?>
	</div>
</div>

<?php 
wp_reset_postdata();
<?php

global $mtm_grid_row_class;
?>

<div class="mtm-grid--single <?php 
echo $mtm_grid_row_class;
?>
">
	<div class="mtm-grid--single-content">
		<?php 
the_mtm_post_thumbnail('medium_large', 'mtm-grid--image');
?>
		<h4><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h4>
	</div>
</div>
<?php

global $mtm_home_feature_count;
?>

<div class="mtm-home-featured--single <?php 
echo mtm_count_classes($mtm_home_feature_count);
?>
">
	<div class="mtm-home-featured--single-content">
		
		<?php 
the_mtm_post_thumbnail('medium_large', 'mtm-home-featured--image');
?>
		<div class="mtm-home-featured--single-text">

			<h3 class="mtm-home-featured--single-title"><a href="<?php 
the_permalink();
?>
">
					
				<?php 
if ("Post Title" == _get_sub_field('mtm_home_featured_box_title')) {
    the_title();
} else {
    esc_html(the_sub_field('mtm_home_featured_box_title'));
}
?>

				</a></h3>
<article class="mtm-list--single">

	<?php 
//$content_size = '-full';
//if ( has_post_thumbnail() ) :
//$content_size = '';
?>

		<section class="mtm-list--image">
			<?php 
the_mtm_post_thumbnail('medium_large', 'mtm-list--image-single');
?>
		</section>

	<?php 
//endif;
?>

	<section class="mtm-list--post-content<?php 
//echo $content_size;
?>
">
		<h4><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h4>
		<p class="post--byline"><?php 
the_time('F j, Y');