Skip to content

Commit

Permalink
Update template-home.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesetzer committed Aug 22, 2023
1 parent 7c1a18f commit 402460f
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion template-home.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@
)
);

if( $posts ) { ?>
//Two column version with images on the left, fallback to single column if no image
/*if( $posts ) { ?>
<ul class="posts">
<?php foreach( $posts as $post ) {
Expand Down Expand Up @@ -430,7 +431,34 @@
} ?>
</ul>
<?php };*/

//Single column version, no image
if( $posts ) { ?>
<ul class="posts">
<?php foreach( $posts as $post ) {
setup_postdata( $post );
$category = get_the_category();
?>
<li>
<a href="<?php the_permalink(); ?>" class="d-block w-100">
<div class="row">
<!-- Full Width Column for Title, Category, and Excerpt -->
<div class="col-md-12">
<div class="title"><?php the_title(); ?></div>
<span class="categoryTitle"><?php if (!empty($category)) echo $category[0]->cat_name; ?></span>
<span class="category"><?php echo get_the_date('M'); ?> <?php echo get_the_date('Y'); ?></span>
<p><?php the_excerpt(); ?></p>
</div>
</div>
</a>
</li>
<?php
wp_reset_postdata();
} ?>
</ul>
<?php };

?>


Expand Down

0 comments on commit 402460f

Please sign in to comment.