This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
2016-11-20 11:09:16 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Partial template to display latest posts (home.php) as grid.
|
|
|
|
*
|
|
|
|
* @package understrap
|
|
|
|
*/
|
2016-11-21 09:54:27 +00:00
|
|
|
$col = get_theme_mod( 'understrap_grid_post_columns' );
|
|
|
|
error_log($col);
|
2016-11-20 11:09:16 +00:00
|
|
|
?>
|
|
|
|
<a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark">
|
2016-11-21 09:54:27 +00:00
|
|
|
<div class="col-md-<?php echo esc_html( $col ); ?> col-xs-12">
|
2016-11-20 11:09:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
<div class="card card-inverse ">
|
|
|
|
|
|
|
|
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
|
|
|
<?php $alt = get_post_meta( get_post_thumbnail_id( $post->ID ), '_wp_attachment_image_alt', true ); ?>
|
|
|
|
<img class="card-img "
|
|
|
|
src="<?php echo esc_html( get_the_post_thumbnail_url( $post->ID, 'large' ) ) ?>" alt="<?php echo esc_html( $alt ); ?>">
|
|
|
|
|
|
|
|
<div class="card-img-overlay">
|
|
|
|
|
|
|
|
<header class="entry-header">
|
|
|
|
<h4 class="card-title"><?php the_title(); ?></h4>
|
|
|
|
|
|
|
|
<?php if ( 'post' === get_post_type() ) : ?>
|
|
|
|
|
|
|
|
<p class="entry-meta card-text">
|
|
|
|
<small>Posted: <?php the_date(); ?> at: <?php the_time(); ?></small>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</a>
|